list-domains.pl process not exiting.

Hi Guys,

Something interesting going on with my server. I noticed memory creeping up in HTOP today and sorted by mem% only to see the attachment of many list-domains.pl running. Are these supposed to time out after a certain time or are they supposed to exit after running?

Thx,

~Jeremy

Status: 
Closed (fixed)

Comments

That's odd, these should exit pretty quickly.

If you SSH in and run virtualmin list-domains, does it exit?

Interesting, when I run it by hand they exit as soon as they are done. I am unable to get more than the 22 processes listed to stay. Is there a cron that runs which calls this perl script?

I killed all of the processes to see if it happens again.

Is there a virtualmin restart command that might clear these up automagically?

~Jeremy

No, it doesn't get called from cron at all .. are you using the Virtualmin API in any way, or using something like WHMCS that calls the API?

I am using WHMCS and have 2 Cron jobs setup.

/usr/bin/wget -q -O /dev/null http://xtremeservices.net/billing/admin/cron.php

and

php -q /home/xtremeservices.net/public_html/billing/modules/registrars/enom/enomsync.php

It is hard telling what they are actually doing though...

I will play with adding accounts through WHMCS and see if that triggers it. I will let you know what I find and report it to WHMCS' Matt.

~Jeremy

One more thing you can try is running :

virtualmin list-domains --multiline

to get the full output, and see if that completes or hangs..

Hi Jamie,

Ok, so I tried the --multiline and nothing stuck around.

During my test of adding and deleting services with WHMCS I found that during the delete-domain.pl call to virtualmin that the list-domain.pl would kick off and stick around.

~Jeremy

I would expect list-domains to perhaps wait until delete-domain completes .. but eventually they should both exit.

Just a follow up,

I checked htop this am and sure enough I have a bunch of list-domains.pl out there again. (See attachment)

I did 2 or 3 deletes of test Virtual Servers with WHMCS last night and ended the list-domains.pl processes that were left over. I monitored htop after the nightly incremental backups took place (thinking they might be causing it) and there was only 1 of these processes out there (1:14am). I left it alone and checked again at 1pm today. I am not sure what caused these 12 new list-domains.pl to start and stick around.

Look forward to any suggestions,

Thanx

~Jeremy

If you run the command strace -f -p XXX where XXX is the PID of one of these processes, what does it output? That will show you what it is trying to do ..

I will do that as soon as they re-appear. (Sorry I jumped the gun and ended them all)

~Jeremy

It would appear that the following Cron job for WHMCS is causing the many list-domains.pl processes.

/usr/bin/wget -q -O /dev/null http://xtremeservices.net/billing/admin/cron.php

I thought I had verified this wasn't the case but after setting it to run every 2 minutes I ended up with a bunch of the processes sitting out there.

Here is the output I get running strace on the 6 PIDs I had available to test.

PID : 5836 root@mars:/home/xtremeservices.net/logs# strace -f -p 5836 Process 5836 attached - interrupt to quit write(1, " PHP fCGId subprocesses: None"..., 1895

PID : 6483 root@mars:/home/xtremeservices.net/logs# strace -f -p 6483 Process 6483 attached - interrupt to quit write(1, " PHP fCGId subprocesses: None"..., 2014

PID : 7642 root@mars:/home/xtremeservices.net/logs# strace -f -p 7642 Process 7642 attached - interrupt to quit write(1, " PHP fCGId subprocesses: None"..., 2014

PID : 8281 root@mars:/home/xtremeservices.net/logs# strace -f -p 8281 Process 8281 attached - interrupt to quit write(1, " PHP fCGId subprocesses: None"..., 2014

PID : 9644 root@mars:/home/xtremeservices.net/logs# strace -f -p 9644 Process 9644 attached - interrupt to quit write(1, " PHP fCGId subprocesses: None"..., 2255

PID : 10298 root@mars:/home/xtremeservices.net/logs# strace -f -p 10298 Process 10298 attached - interrupt to quit write(1, " PHP fCGId subprocesses: None"..., 2255

~Jeremy

Ok, I see the cause of this now .. it is actually a Virtualmin bug, triggered by the size of the list-domains output on your system.

The work-around is to edit the file /usr/share/webmin/virtual-server/remote.cgi and change the line :

pipe(SUBr, SUBw);

to :

socketpair(SUBr, SUBw, AF_UNIX, SOCK_STREAM, PF_UNSPEC);

The next Virtualmin release 3.87 will include this fix ..

Thank you MUCH!!

That worked like a charm.

Hope you have a great weekend!

~Jeremy

Automatically closed -- issue fixed for 2 weeks with no activity.