Hi everyone, I've wrote a game server over Mina 2.0 RC1, I was using an unbounded thread pool(Executors.newCachedThreadPool()) on mina executor filter. The problem is that I was constantly experiencing some weird behaviour, after some time running, the server begin to not process requests from new connections, the clients already connected seems to work fine. Analyzing the thread dump I see that when this situation happens a lot of threads from the pool are parking on SynchronousQueue.poll, and the tasks were not being executed. I googled for a time, found some people with the same problem, tried some things, and nothing worked. I ended up with a pool of fixed size executors implementing AbstractExecutorService, when one executor doesn't have any thread to execute a new task I start a new one, each one with a core pool size of 50. I also created a daemon thread to shutdown unused executors to avoid memory leaks but I'm not sure it will work.
Has anybody else had the same problem? My solution seemed to work well, we have no more experienced the issue, but I don't like it. Is it better to have one unique executor with a huge core pool size? The server is expected to support thousands of clients, today we have 300 players online. Thanks in advance, Moisés
