In file: scci/src/org/starpound/cci/sip/Dispatcher.java, it used the follow code snip to create new worker thread:
new Thread() {
public void userAgent.onContinueInviteSipServerEvent(connectionParam, responseEventParam, messageQueueParam);
}
}.start();
There is no threshold on how many threads can be created, in a heavily loaded system, this can cause threads overflow and out of memory.
To solve the problem, we need to use thread pool with fixed number threads. The number of thread should be defined in a system properties.