Posted by TonyV on May 6, 2010 at 2:04pm
I'm really at whit's end with this one. My cron hasn't run for about three weeks. It keeps failing with the log message "Attempting to re-run cron while it is already running."
I have disables all contrib modules and tried to rerun, with no luck. I have disabled search module with no luck. I have flushed cache repeatedly with no luck. I have followed all the steps in this post (except the last one because I don't know where to put the code): http://drupal.org/node/553430
Any ideas? Please help!!!
Comments
Sounds like you have old data
Sounds like you have old data stuck in the database, so the system thinks cron is still running even though it isn't. Do you have direct access to your database via either shell or PHPMyAdmin?
If so, running the sql lines from the handbook page you referenced should fix things.
DELETE FROM variable WHERE name="cron_semaphore";DELETE FROM variable WHERE name = "cron_last";
I do have access via
I do have access via phpmyadmin, and I did go in and delete those records. Still no relief. Any other ideas? Thanks so much for the response!
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I looked back at the database
I looked back at the database and I see a new entry for "cron_semaphore." I also see and entry called "cron_threshold_semaphore." Is this something I should be deleting as well?
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
After deleting cron_semaphone
After deleting cron_semaphone it reappeared? Hmm. That means cron started running.
Are you running the poormanscron module? The only references I'm finding to that cron_threshold_semaphore are from there. I found a post in their issue queue that sounds similar to what you're seeing: http://drupal.org/node/698892 Let me know if anything in there rings familiar for you.
Thanks so much for your
Thanks so much for your response. Yes, we are running poormanscron on this site.
I just noticed this error in the log files:
Data too long for column 'type' at row 1 query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'module_invoke_all', 'return from votingapi after 0.00121 sec.', 'a:0:{}', 5, '', 'http://www.yoursite.com/poormanscron/run-cron-check', 'http://www.yoursite.com/user', '64.190.165.186', 1273491843) in D:\Apache\htdocs\modules\dblog\dblog.module on line 144.Any idea how to approach this, or if it is related?
I did check the thread you referenced and while some of it kind of rings true, I don't really see that they have fixed the issue. We don't have XML Sitemap running.
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
The MySQL error **shouldn't**
The MySQL error **shouldn't** be related. Normally MySQL will silently truncate values that are too long for a field, but since it references poormanscron...
So cron still fails even with poormanscron disabled?
Maybe you've already tried, but disable poormanscron, delete the cron_... variables from the variables table, clear your cache (hardly ever hurts) and try running cron manually. If the problem is in the module, then things should work. If not then at least we know what it's not.
OK, did all of the above.
OK, did all of the above. Under Status Report, I now get a message that says "Cron Never Run."
When I go into the log files, I do see a "Cron Run Completed" message, but I'm not sure I believe it.
I now also see an error message in logs: Call_user_funct_array...
call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'poormanscron_run_cron_check_access' was given in D:\Apache\htdocs\includes\menu.inc on line 452.I also see dozens of entries for that "Data too long for column" error from a previous post. Any ideas?
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
You're getting that error
You're getting that error with poormanscron disabled and after clearing your cache?
Should I just increase the
Should I just increase the length of the "Type" column in the watchdog table based on these errors?
Data too long for column 'type' at row 1 query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'module_invoke_all', 'return from site_user_list after 0.00085 sec.', 'a:0:{}', 5, '', 'http://www.mysite.com/admin/reports/status/run-cron', 'http://www.mysite.com/admin/reports/status', '24.106.97.2', 1273504799) in D:\Apache\htdocs\modules\dblog\dblog.module on line 144.------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
Cron says it completes, but
Cron says it completes, but then when I try to run cron later, I get the "already running" error. See this screenshot of my recent log messages: http://www.tonyvallemusic.com/uploads/log.jpg
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I wonder if the manual run is
I wonder if the manual run is working but something else is invoking cron again? Have you tried uninstalling poormanscron (if the module provides that option) and moving it's folder out of sites/*/modules?
Haven't tried that but I'll
Haven't tried that but I'll do that now and let you know how it goes.
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I have now removed poorman's
I have now removed poorman's cron completely and the problem still persists. Still getting that "cron is already running" message when I try to run cron.
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
After removing the module did
After removing the module did you clear the cron_... variables from your database?
Hmm. I'm not sure that I
Hmm. I'm not sure that I did. I'll check that and try again...
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I checked and there are no
I checked and there are no cron variables remaining. Nice idea though.
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
So there are no cron_
So there are no cron_ variables in the variable table but yet it still tells you that cron is already running? That is very odd.
You might also try going to the module list page and clicking "Save configuration", even without making changes. I think that will force Drupal to rebuild it's menu links and callbacks. Then clear all the caches (which I'm guessing you've already done). Then try to run it manually yet again, I guess.
What version of Drupal are you running?
Running 6.15
Running 6.15
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I'm getting an interesting
I'm getting an interesting error in the logs when I run backup/migrate. Don't know if it's related or not. Poorman's cron is totally removed, so I don't know where this is coming from:
call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'poormanscron_run_cron_check_access' was given in D:\Apache\htdocs\includes\menu.inc on line 452.------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I see that Poorman's Cron is
I see that Poorman's Cron is still in the system table. Is that something that I should be removing all together?
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I had the same problem and
I had the same problem and that worked for me.
Disabling the update status
Disabling the update status module and running the aboe worked for me.
DELETE FROM variable WHERE
DELETE FROM variable WHERE name="cron_semaphore";DELETE FROM variable WHERE name = "cron_last";
This worked for me. I had to clear my drupal cache after running the sql above. Then I ran cron manually and it worked.
GoDaddy Coupons - Save money on domains and web hosting
Glumbo Shopping - Compare prices for millions of products to get the lowest price
Update on Issues and My Progress
O.K., I thought I'd post a lengthy description of exactly what's going on at this point. I can get cron to run one time manually. The next time I try to run cron, I get the "cron is already running" error.
I'll also point out that I'm needing to run cron several times in a row because I am trying to re-index my site, and I have something like 40,000 records left.
So my process is this:
1. remove cron_semaphore from variables table
2. flush all chaches
3. run cron
4. rinse / repeat
Note: after each time that cron runs, I get the error below:
call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'poormanscron_run_cron_check_access' was given in D:\Apache\htdocs\includes\menu.inc on line 452.I have removed poormanscron completely, so I don't really know what's going on here.
Also:
My search currently returns no results. Is this because the site is only 13% indexed so far? I'm a bit concerned by this because I would think that SOME content would be returning in results.
Thanks for any help with this!!
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
That is so damn weird.
That is so damn weird. Somewhere there's a reference that isn't getting cleared out.
Try running
select cid, expire, created, headers, serialized from cache_menu where data like '%poormanscron%';directly against the database. Or you could go for the broadsword approach and just truncate that table.Also, if you have the capacity, try grepping for poormanscron in your site directory.
Ran the select statement,
Ran the select statement, found a record and deleted it from cache_menu. Ran my cron and got the same error seen below:
call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'poormanscron_run_cron_check_access' was given in D:\Apache\htdocs\includes\menu.inc on line 452.------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
Can you grep for
Can you grep for "poormanscron" in your site directory? If it's showing up back in the cache_menu it must be somewhere; either elsewhere in the database or in the filesystem somewhere.
Update -
So I have figured out that each time I run Cron a record that references Poormanscron is placed in the cache_menu table. Strange.
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
I have manually run cron
I have manually run cron enough times that my entire database is re-indexed, yet the search returns NO results!!
------------------------------------------------------------------
Tony Valle
Promethius Consulting, LLC
Twitter: @pcindy / @PromethiusLLC
Drupal 6.17 - after migrating
Drupal 6.17 - after migrating to host.
I'm running into what looks like the same situation, although I never installed poormanscron.
Did anyone ever find a solution? Are you running CiviCRM by any chance? Thanks for the detailed reports... very helpful (I hope.)
Same here after installing Drupal 6.17
No poormanscron (have shell access to my host account), but manual cron tests return in the log that cron is already running, even after deleting the variables...
Have you found a solution
Have you found a solution yet? I am having the exact same problem =/
This worked for me: drush
This worked for me:
drush --yes vset cron_semaphore 0guaka.org - PR9.nl
That did the trick
I was hitting the same issue running cron via drush (
Attempting to re-run cron while it is already runningwithAn error occurred at function : drush_core_cron).Guaka's post fixed the problem (running
drush --yes vset cron_semaphore 0).thanks!
ak
(success story) worked for me as well
I was getting this error:
$ drush cron
WD cron: Attempting to re-run cron while it is already running. [warning]
Cron run failed. [error]
An error occurred at function : drush_core_cron [error]
... So I used the above command:
$ drush --yes vset cron_semaphore 0
cron_semaphore was set to 0. [success]
... then reran cron:
$ drush cron
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12485 bytes) in /var/www/vhosts/###/subdomains/###/httpdocs/includes/common.inc on line 558
Drush command could not be completed. [error]
WD cron: Cron run exceeded the time limit and was aborted. [warning]
.. so to fix this, I edited /includes/common.inc, and put a new line near the top:
<?php
// $Id: common.inc,v 1.756.2.106 2010/12/15 21:11:22 goba Exp $
if ((int) ini_get('memory_limit') < 96) { ini_set('memory_limit', '96M'); } # this prevents cron dying too fast.
/**
* @file
* Common functions that many Drupal modules will need to reference.
*
* The functions that are critical and need to be available even when serving
* a cached page are instead located in bootstrap.inc.
*/
... then reran cron again:
$ drush cron
Cron run successfully. [success]
HOORAY!
it worked for me ..thanks a lot
It worked for me . Thanks a lot.
Disabling Search module worked for me
Followed most of the steps given here did not work for me. Finally, I followed the steps in http://drupal.org/node/553430, and it worked - Cron ran successfully.
Here is what i did:
- created a block to list the modules that implement hook_cron using:
<?phpecho theme('item_list', module_implements('cron'));
?>
- search was listed among them, so disabled it
- removed the entries for cron_semaphore and cron_last from the variable table
- truncated the tables cache_*, accesslog, watchdog and sessions
- Run cron (using Admin menu)