Victor wrote:
Emmanuel,
I looked into OrderedThreadPoolExecutor code in more details - seems
we need to limit both "waitingSessions" queue and "sessionTasksQueue"
which is stored in IoSession. Both queues are unlimited now, so this
can lead to OutOfMemory under high load.
Yes, but the "sessionTasksQueue" is never explicitly created by the user
: it's created when the worker need it. We should expose a way to
configure this queue.
One more question about "corePoolSize" and "maximumPoolSize" - are
they used in the same manner as in ThreadPoolExecutor? I mean the
following:
"
When a new task is submitted in method ThreadPoolExecutor.execute, and
fewer than corePoolSize threads are running, a new thread is created
to handle the request, even if other worker threads are idle.
If there are more than corePoolSize but less than maximumPoolSize
threads running, a new thread will be created only if the queue is full.
"
Especially the 2nd part where the queue is used instead of creating
new threads.
The way the executor is created, those values are just passed to the
underlying java class. We don't do anything with those values inside
MINA code.
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org