Page 1 of 1

CXS Cron hanging

Posted: 15 Jan 2014, 00:12
by ckh
Got an odd problem on the last server you guys set up.

The cxs daily cron will sometimes just hang and prevent the logrotate process from running. I'll notice it when I receive an email that /var is running out of drive space, due to logs growing in size.

If I kill the cxs cron, then logrotate will run. I've noticed this happening about 3 or 4 different times since last december. Just noticed it now, looks like it hung on 12 Jan 2014, the logs were rotated on the 11th and now that I killed the cron, the logs rotated today, 14 Jan.

Any idea what I should be looking for? I have cxs installed on all my shared servers and a couple more, maybe 8-10 servers and this is the only one that hangs. Current version is 4.10

Re: CXS Cron hanging

Posted: 15 Jan 2014, 08:46
by ForumAdmin
We'll look at adding a timeout. For now, if you edit the script and place a space then an ampersand " &" at the end of each cxs line in /etc/cxs/cxsdaily.sh it should fork the process and not block the cron job.

Re: CXS Cron hanging

Posted: 15 Jan 2014, 16:21
by ckh
Thanks for the fix and quick repy!

Re: CXS Cron hanging

Posted: 18 Jan 2014, 20:15
by ckh
Added the space ampersand and it hung again, stopping the other daily crons:

/usr/sbin/cxs --upgrade --quiet &
/usr/sbin/cxs --qclean 7 --quarantine /home/quarantine --quiet &

are the two lines that aren't remarked out. I modified it on the 15th, worked on the 16th, then on the 17th, it hung again, killing the process allowed the other crons to run.

Re: CXS Cron hanging

Posted: 18 Jan 2014, 20:58
by ForumAdmin
It might help if you could log a ticket with access details when the process hangs again so we can look at it, if possible. We'll keep looking into possible causes, though.

Re: CXS Cron hanging

Posted: 18 Jan 2014, 22:21
by ForumAdmin
Additionally, to prevent it hanging your daily cron you might want to remove the current jobs and add them via:

Code: Select all

crontab -e
And schedule them for some time convenient to you. It may still hang, but should not hold anything up.

Re: CXS Cron hanging

Posted: 19 Jan 2014, 08:57
by ForumAdmin
We were able to recreate the problem. This should hopefully now be fixed once you are running on v4.14:
http://blog.configserver.com/

Re: CXS Cron hanging

Posted: 19 Jan 2014, 09:06
by ckh
That was quick, thanks. I'll let you know if it happens again.

Re: CXS Cron hanging

Posted: 27 Jan 2014, 17:11
by ckh
This hasn't happened since I updated to 4.14, so the fix is working.

Re: CXS Cron hanging

Posted: 27 Jan 2014, 17:12
by ForumAdmin
Thank you for the follow-up, glad to hear it :)