LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2006, 10:29 AM   #1
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
vixie-cron fails with System error


I am currently having difficulties with vixie-cron (vixie-cron-4.1-44.EL4) running on CentOS 4.3
Here is the situation, I set up a bunch of cronjobs (100 or so in a normal user's crontab) that execute PERL scripts. There is about 20 jobs that run every minute (100 in a 5 minute period).

Now here is the problem, I keep seeing a 'System error' message in the cron log files and the PERL script fails to execute.
Code:
Aug  1 10:21:01 livestats crond[3585]: System error
If I run these scripts manually, I have no problems and the load on the server is ok. There is no pattern - that I can see - to when I get these errors.
I was able to upgrade the Kernel and vixie-cron to latest available version from the distro, but I still get these errors.

If anyone has a suggestion to give, I am all ears.
 
Old 08-01-2006, 11:54 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Check /var/log/messages and /var/log/audit/audit.log (if it exists, and you are using SELinux).
 
Old 08-01-2006, 02:02 PM   #3
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Original Poster
Rep: Reputation: 46
There is nothing in /var/log/messages and SELinux is disabled.
I am at a lost...
 
Old 08-01-2006, 02:07 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Have you edited the crontab file manually, or are you using the 'crontab -e' command? The crontab command checks syntax; perhaps there's an error in the file?
 
Old 08-01-2006, 03:43 PM   #5
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Original Poster
Rep: Reputation: 46
Yes, I use the 'crontab -e' command to edit it.

The 'System error' message in the cron log files appears at (from what I can tell) at random times. It is never at the same time with the same scripts, it changes... different times, different scritps.
 
Old 08-01-2006, 03:48 PM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Perhaps the error is being reported by one of the scripts (or something they in turn run), and not by cron itself. Are there any root emails from cron? If so, that's the likely cause.
 
Old 08-29-2006, 04:28 PM   #7
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Original Poster
Rep: Reputation: 46
I did think about that possibility. My scripts interface with MySQL and other daemons using PERL modules. If that is the case, then the daemons are throwing bad exceptions that cause the whole script to die.
I did look at the various configurations files and made some changes which seems to have help (I think), but I still get some 'System Errors'.

However, I now believe that these 'System Errors' may be caused by a lack of system resources (i.e. CPU availability).
Is it possible that CRON (or another Linux process) comes along and decides to kill my script if there is not enough available CPU available?


P.S. Sorry for the long delay.
 
Old 08-29-2006, 04:33 PM   #8
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
If you have resource limits set (e.g. ulimit), then that can certainly stop your program. If the system runs out of memory, the OOM (Out Of Memory killer in the kernel) could kill the process to save the system. If that happened, there will be a message in the system log (/var/log/messages).
 
Old 08-30-2006, 01:59 PM   #9
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Original Poster
Rep: Reputation: 46
I don't think memory is the case, I see no errors in /var/log/messages and if OOM does kill a process, it tells you which one it killed and outputs the message on the console and in /var/log/messages. The 'System Error' message only appears in /var/log/cron

At the Linux level (kernel level), CPU time and memory size are set to unlimited. I was thinking more along the CRON level, are there any limitation to vixie-cron itself that would cause CRON to kill a process (i.e. cronjob) ?
 
Old 08-30-2006, 02:18 PM   #10
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Not that I'm aware of. There are other limits system that can be exceeded besides CPU and memory. Most distributions have a default maximum on user processes (if a processes goes into a loop spawning processes), and open files (a loop opening temp files, for example). The result will be the same - the process will fail.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vixie-cron update wanted Ystack Linux - Software 2 01-12-2006 09:24 PM
Problem with using vixie cron sendas4 Linux - Newbie 2 07-05-2005 05:38 PM
How to Upgrade [ vixie-cron-4.1-2_EL3 ] rpm maxboost Linux - Enterprise 1 03-07-2005 04:40 PM
vixie-cron issues Bigun Linux - Software 1 12-17-2004 09:08 AM
Cron/Vixie runs jobrotate 6 hours late SEL Linux - General 0 04-21-2002 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration