Re: [OpenSIPS-Users] high process count
Bret, try: ps aux --forest | grep opensips that will show you parent and child processes in tree diagram and if any opensips master process is actually responsible for so many of them. I agree that it is probably being spawned many times with a cron job, loop in the init script or a service like monit. Dave On Sat, Apr 30, 2011 at 12:53 PM, Bret McDanel trix...@0xdecafbad.comwrote: On Sat, 2011-04-30 at 19:37 +0100, Stanisław Pitucha wrote: You mean that fifo ps returns a low number of processes? How are you starting up opensips? What kind of scripts / process management are you using? I would guess that something you use to start up opensips is not working as you expect and keeps respawning it all the time. Of course new processes won't stay around for long because they'll try to bind on some ports which are already taken. But if you're respawning often enough, the total count could go into thousands. The extra processes are because it is forking doing something, it is not multiple instances being started like you suggested. They all have the same parent ID. ps auxww | grep opensips | wc -l the list keeps growing. And if I kill opensips most die but not all, and those are only terminated with a kill -9. I show about 7 with opensipsctl ps but hundreds (it constantly grows they never die). They are clearly blocking somewhere, and it cannot be a syscall because a kill -9 cant take those out. I am about to dig in and try to find out where and more importantly why. I start opensips fork=no logstderr=yes debug=10 with only a -f and -P option in a standard shell. -- Trixter aka Bret McDanel website: http://www.0xdecafbad.com pgp key: http://bit.ly/9XYK4b ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] high process count
On Wed, 2011-05-04 at 07:30 -0700, Dave Singer wrote: Bret, try: ps aux --forest | grep opensips that will show you parent and child processes in tree diagram and if any opensips master process is actually responsible for so many of them. I agree that it is probably being spawned many times with a cron job, loop in the init script or a service like monit. I had fixed the problem, it was in fact a problem with the dialplan where processes would get stuck and not exit. Extra cruft at the end of route{} that should not have been there (and was never executed, but deleting it made the problem go away). It specifically was not being spawned many times from monit, that was intentionally disabled so that I could restart without a mailbomb. -- Trixter aka Bret McDanel website: http://www.0xdecafbad.com pgp key: http://bit.ly/9XYK4b ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] high process count
I am seeing an ever increasing number of processes in opensips (from under 10 at launch to over 1000 after a few hours). How can I tell where those processes are (apparently) blocking and not exiting like they should? -- Trixter aka Bret McDanel website: http://www.0xdecafbad.com pgp key: http://bit.ly/9XYK4b ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] high process count
Hello, This is strange. You could do scripts/opensipsctl fifo ps and paste the name of the repeating processes here. You could also choose one of the pids of those stuck processes and attach via gdb : gdb path-to-opensips-binary pid and also reply with a backtrace. Regards, Bret McDanel trix...@0xdecafbad.com wrote: I am seeing an ever increasing number of processes in opensips (from under 10 at launch to over 1000 after a few hours). How can I tell where those processes are (apparently) blocking and not exiting like they should? -- Trixter aka Bret McDanel website: http://www.0xdecafbad.com pgp key: http://bit.ly/9XYK4b ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] high process count
You can get a little more information on those processes with: opensipsctl ps The output of that command would likely be useful in troubleshooting -Brett But 1000 sounds like way too many On Apr 30, 2011, at 5:53 AM, Bret McDanel trix...@0xdecafbad.com wrote: I am seeing an ever increasing number of processes in opensips (from under 10 at launch to over 1000 after a few hours). How can I tell where those processes are (apparently) blocking and not exiting like they should? -- Trixter aka Bret McDanel website: http://www.0xdecafbad.com pgp key: http://bit.ly/9XYK4b ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] high process count
On 30 April 2011 19:22, Bret McDanel trix...@0xdecafbad.com wrote: gdb it is, the fifo ps command returns the same data despite the fact that my process table continues to fill and those processes wont die without a sigkill. I was trying to avoid that because I was thinking it was a simple configuration problem but I am now less convinced of that. You mean that fifo ps returns a low number of processes? How are you starting up opensips? What kind of scripts / process management are you using? I would guess that something you use to start up opensips is not working as you expect and keeps respawning it all the time. Of course new processes won't stay around for long because they'll try to bind on some ports which are already taken. But if you're respawning often enough, the total count could go into thousands. -- KTHXBYE, Stanisław Pitucha ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] high process count
On Sat, 2011-04-30 at 19:37 +0100, Stanisław Pitucha wrote: You mean that fifo ps returns a low number of processes? How are you starting up opensips? What kind of scripts / process management are you using? I would guess that something you use to start up opensips is not working as you expect and keeps respawning it all the time. Of course new processes won't stay around for long because they'll try to bind on some ports which are already taken. But if you're respawning often enough, the total count could go into thousands. The extra processes are because it is forking doing something, it is not multiple instances being started like you suggested. They all have the same parent ID. ps auxww | grep opensips | wc -l the list keeps growing. And if I kill opensips most die but not all, and those are only terminated with a kill -9. I show about 7 with opensipsctl ps but hundreds (it constantly grows they never die). They are clearly blocking somewhere, and it cannot be a syscall because a kill -9 cant take those out. I am about to dig in and try to find out where and more importantly why. I start opensips fork=no logstderr=yes debug=10 with only a -f and -P option in a standard shell. -- Trixter aka Bret McDanel website: http://www.0xdecafbad.com pgp key: http://bit.ly/9XYK4b ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users