LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-14-2012, 03:32 AM   #1
Nighteyes
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Rep: Reputation: Disabled
Cron run fails at random points, throws: Attempting to re-run cron while....


Ok, so a bit of background to this:

I'm developing for Drupal (CMS), I've been though all my code, stepped through it, run it all locally, everything works fine.

I put it on the live box, and it starts to get weird. cron run starts fine, it runs fine to a certain point, and then apparently, while running, it tries to run again.

it throws: Attempting to re-run cron while it is already running.

Which is fine, you'd expect that if cron tries to run while already running, but the job that's currently running stops. It doesn't throw any errors, there are no PHP exceptions or anything, and its got me pretty much stumped.

To check what's going on, I added 4 watchdog entries to the code (for those not familiar, its a Drupal error report system. Watchdog writers an entry to the database at any given point)

The first entry for cron hitting the start of the module code
The second entry for cron starting a loop in the module
The third entry is the end of a loop
and the fourth is the end of that module cron run.

So it should look something like this: (it reads bottom up)

Code:
MMI_User_cron_End	06/14/2012 - 09:00	Hook_cron has ended	Anonymous (not verified)
MMI_User_cron	06/14/2012 - 09:00	cron ran though this user: Uid: 40 Name: Suigetsu...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron has started to go though this user: Uid: 40 Name...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron ran though this user: Uid: 39 Name: Cutie...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron has started to go though this user: Uid: 39 Name...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron ran though this user: Uid: 35 Name: Lady...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron has started to go though this user: Uid: 35 Name...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron ran though this user: Uid: 1 Name: SoC Darkord...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron has started to go though this user: Uid: 1 Name:...	Anonymous (not verified)	
cron	06/14/2012 - 09:00	uid 0 loop: MMI User cron looped 0 time(s) though the...	Anonymous (not verified)	
MMI_User_cron	06/14/2012 - 09:00	cron has started to go though this user: Uid: 0 Name:	Anonymous (not verified)	
MMI_User_cron_Start	06/14/2012 - 09:00	Hook_cron has started	Anonymous (not verified)
instead it gets to a random point, and then stops. it might be after it has started a loop, it might be after its ended a loop, its always on a different pass, and its always when a new cron job attempts to start.

I hope all that makes some sort of sense, Any help would be much appreciated.

extra bits:

Cron tab: 0,30 * * * * wget -O - -q -t 10 http://www.theknightsofliberty.org/m...ron_key=****** >/dev/null 2>&1

Im running Cpanel

Hosting: Siteground (aweful, i know)

Last edited by Nighteyes; 06-14-2012 at 03:48 AM.
 
Old 06-16-2012, 05:50 AM   #2
nick2day
LQ Newbie
 
Registered: Jun 2012
Distribution: Arch Linux
Posts: 11

Rep: Reputation: Disabled
Some hosts will limit the amount of crons or running processes you have, some will even execute 'kill' commands to user PIDs that exceed a pre-determined time frame.

I wouldn't be suprised if this was what you're running into. Have you tried contacting your host?
 
1 members found this post helpful.
Old 06-22-2012, 05:08 AM   #3
Nighteyes
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Sorry for the late reply, just back from holiday.

That sounds like the case to me, Siteground are useless at the best of times, and without being able to reproduce the bug locally using, as far as i can tell, the same setup there doesn't seem to be much else it reasonably could be.

Thanks for the input , i will be changing hosts next month, need a bigger box and a better provider
 
  


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
Debian daily cron job won't run, but does run in cron.hourly. sandersch Linux - General 7 05-24-2012 01:50 AM
[SOLVED] Partial list with ls-l in bash script run in cron but full list run from command line redgshost Linux - General 29 01-16-2011 12:14 PM
cron backup job fails to run bluethundr Linux - Newbie 5 01-06-2011 05:50 AM
can not run cron ankitsagwekar Red Hat 9 08-11-2008 02:27 AM
nothing seems to run from cron cbannister Linux - Newbie 8 04-08-2008 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:35 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