Sip-Servlets: How to set number of threads for processing SIP messages that were received over TCP ?

162 views
Skip to first unread message

alexander kozlov

unread,
Jan 18, 2011, 9:22:43 AM1/18/11
to mobicents-public
Hi,

In mss-sip-stack.properties there is
"gov.nist.javax.sip.THREAD_POOL_SIZE" property that configures number
of threads for messages that were received over UDP.
I tried "gov.nist.javax.sip.TCP_POST_PARSING_THREAD_POOL_SIZE" but it
have no effect.

So, Is it possible to process TCP messages within multiple threads ?

Vladimir Ralev

unread,
Jan 18, 2011, 10:21:08 AM1/18/11
to mobicent...@googlegroups.com
Can you paste the part of the server log that displays the parsed JSIP attributes at boot time and your server.xml and a thread dump of the server after you started the load?

alexander kozlov

unread,
Jan 18, 2011, 12:55:41 PM1/18/11
to mobicent...@googlegroups.com
Logs are attached.
log_and_dump.zip

alexander kozlov

unread,
Jan 18, 2011, 12:58:29 PM1/18/11
to mobicent...@googlegroups.com
I see in the log
gov.nist.javax.sip.TCP_POST_PARSING_THREAD_POOL_SIZE=128

but there no 128 thread in dump.

Jean Deruelle

unread,
Jan 18, 2011, 1:01:45 PM1/18/11
to mobicent...@googlegroups.com
I'm not sure the threads are prestarted, I think this is why you don't see them on startup
Try send a few messages and record the thread dump during the processing this will show it

Vladimir Ralev

unread,
Jan 18, 2011, 1:02:54 PM1/18/11
to mobicent...@googlegroups.com
Those threads are created after the first tcp call. Did you start the load? There are also no Pipeline threads which means no calls are on afaik.

alexander kozlov

unread,
Jan 18, 2011, 1:16:54 PM1/18/11
to mobicent...@googlegroups.com
I attached new thread dump during stress testing.
thread_dump2.zip

Vladimir Ralev

unread,
Jan 18, 2011, 5:36:57 PM1/18/11
to mobicent...@googlegroups.com
You've hit this Issue http://code.google.com/p/mobicents/issues/detail?id=2283 . It is easy to fix and you will have the fix soon.

PipelineThread-0 has crashed for you due to some transport error. You can workaround this issue if you use separate TCP socket for each call. Right now you are using a single TCP socket for all calls - is this due to some testing mode or this is the normal condition for your scenario?

Vladimir Vysotsky

unread,
Jan 18, 2011, 9:46:19 PM1/18/11
to mobicents-public
Just to add some context - we're encountering this problem primarily
in two scenarios:

1) Server-server interactions, where we would like to use a small
number of persistent TCP or TLS connections, possibly just one, for
multiple calls. Establishing a new connection for every call or
transaction would unnecessarily increase server load and latency, and
potentially exhaust the dynamic TCP ports

2) Persistent client-server connections, where the client needs to
maintain the connection made from behind the firewall, or made over
TLS. See also http://code.google.com/p/mobicents/issues/detail?id=2254

Thanks for finding and filing #2283, and we would really appreciate a
quick fix for it.

-=- Vlad

On Jan 18, 2:36 pm, Vladimir Ralev <vladimir.ra...@gmail.com> wrote:
> You've hit this Issuehttp://code.google.com/p/mobicents/issues/detail?id=2283. It is easy to fix
> and you will have the fix soon.
>
> PipelineThread-0 has crashed for you due to some transport error. You can
> workaround this issue if you use separate TCP socket for each call. Right
> now you are using a single TCP socket for all calls - is this due to some
> testing mode or this is the normal condition for your scenario?
>
> On Tue, Jan 18, 2011 at 8:16 PM, alexander kozlov <
>

alexander kozlov

unread,
Jan 19, 2011, 8:59:16 AM1/19/11
to mobicents-public
>Right now you are using a single TCP socket for all calls - is this due to some
> testing mode or this is the normal condition for your scenario?

Yes, In my testing I suppose that it's traffic between two servers
which are usually uses single TCP socket,
but I think in this case messages should be processed by multiple
threads also.

Vladimir Ralev

unread,
Jan 19, 2011, 10:45:07 AM1/19/11
to mobicent...@googlegroups.com
OK, the fix was checked in in JSIP. The build is coming.

Vladimir Ralev

unread,
Jan 20, 2011, 4:06:13 AM1/20/11
to mobicents-public
I am not very sure about our build system right now. I attached a
fixed jsip jar here http://code.google.com/p/mobicents/issues/detail?id=2283
Can you try it to see if it fixes your problem?

alexander kozlov

unread,
Jan 20, 2011, 10:28:51 AM1/20/11
to mobicents-public
Thanks, attached library works better and as expected.

alexander kozlov

unread,
Feb 10, 2011, 5:55:33 AM2/10/11
to mobicents-public
Hi Vladimir,

I tried to use Mobicents Sip Servlets #1078 r16815, and I got original
problem.
Could you please fix problem in mobicents trunk ?

Vladimir Ralev

unread,
Feb 10, 2011, 10:36:24 AM2/10/11
to mobicent...@googlegroups.com
It seems the build is not pulling the latest JSIP snapshot and just uses some old version. Not sure what is going on, some maven issue.I will try to figure it out.
Reply all
Reply to author
Forward
0 new messages