Closed (fixed)
Project:
Drupal core
Version:
7.9
Component:
other
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Apr 2009 at 21:37 UTC
Updated:
10 Oct 2013 at 13:02 UTC
Jump to comment: Most recent
Comments
Comment #1
austintnacious commentedI have that happen quite often!
I probably have too many modules installed and enabled but what the. . .
I can't remember where I picked this up but I'll pass it along. . .
Sometimes when your cron run fails if you go into your Drupal database's "variables" table and delete the "cron semaphore" and "cron last run" entries and then try running cron again.
It seems to work for me about 80% of the time.
Good luck!
Comment #2
snorkers commentedI can't find a variable called cron semaphore anywhere in my MySQL database. Cleared cron_last_run, but didn't bring back cron at all :-(
Comment #3
Anonymous (not verified) commentedThis may be a duplicate of #361171: How to debug cron stoppage problems with bad PHP content. I have the same issue of cron.php not executing on one site I upgraded from 5.3. The problem is that some modules hook_cron implementation fails but we have no idea which module because cron.php registers a shutdown function and that function doesn't report module failures making the message from the cron run totally meaningless. Later.
Comment #4
snorkers commentedThanks for the suggestion @earnie, but proved a fruitless effort
I disabled Search: cron still does not run
So I also turned off Porter-Stemmer (improved search module): no change
Thinking it may be related to Path, I also turned off Path, Pathauto and Global Redirect: no change
What's even more worrying is that when I run /cron.php directly, it now bails out after a mere 3-400ms with all those modules disabled. The PHP script limit [on my dev machine] is currently set to a whopping 240s. Which leads me to think that the cron problem is not related at all to Path and Search -type functionality.
Mmmm...
Comment #5
sunilkumar commentedI tried after disabling search module( an many other modules like aggregator), no result. But I want to check that Drupal database variable deletion. Till now I am not able to do that because of my network connection problem. Shall write the result here tomorrow or day after.
Regards,
-S-
Comment #6
sunilkumar commentedI did as "austintnacious" instructed. But still the message is "cron run failed". At the same time admin/reports/status it shows against Cron maintenance tasks: "Last run 6 sec ago". Does this means cron was OK, but the message is incorrect?
I am not getting any idea!
Regards,
-S-
UPDATE: I tried to run cron again after some time. But not successful. That means the message is correct. How to solve this?
Comment #7
Anonymous (not verified) commentedBased on my debugging via adding messages to watchdog. My cron.php is dying returning the $node object from node_build_content. The $node object never appears to the calling function.
The node is rendered to the browser instead. The results I see at least make some sense now.
Comment #8
Anonymous (not verified) commentedComment #9
Anonymous (not verified) commentedHmm... I was able to deactivate search and execute cron on my site. Reactivating the search module returned the previous result. I do know the problem is deeply rooted into Drupal or even PHP. The result is the page being worked on by the search_cron implementation ends up displayed instead of indexed. The status of % indexed seems to be invalid on the settings page as well. It reports zero but I know there is already data in the file.
Comment #10
dave reidAnother module that kills cron: pingback. Disable that one too if you have it enabled.
#271704: Infinite Cron
Comment #11
Anonymous (not verified) commentedComment #12
gdip commentedI recently upgraded from Drupal5 to Drupal6.
My system consists of
Apache/2.0.63 (FreeBSD 7.0 )
PHP/5.2.10 with Suhosin-Patch mod_ssl/2.0.63 OpenSSL/0.9.8e
MySQL version: 5.1.35
eAccelerator: 0.9.5.3
I had the same problem as described here and have done the following ...
See http://drupal.org/node/361171
(for some reason this is not possible from within Drupal Search settings)
http://www.mojahmedia.net/drupal-cron-run-failed-cron-busy-probably-stuc...
to release a stuck cron.
Very few findings
Apache error log complained about a call to the (nonpresent!) tablemanager in one site.
Searched all nodes and blocks for php code but couldn't find anything special. Somewhere on this Drupal site someone mentions that a MySQL command has changed and has to replaced when upgrading to Drupal6. Couldn't find it again :-(
How I solved it (maybe?)
In one of the small sites which gave the table manager error, I installed it and that solved the problem for that site. Of course I deinstalled it prior to upgrading but for some reason the search indexer thought it was enabled. Since my programming skills are limited I have no clue to why this can happen.
I deinstalled eAccelerator (found a note about incompatibilities between it and the Zend engine). No difference. Reinstalled it.
I installed supercron, http://drupal.org/project/supercron, and turned off search to make sure none of the other cron hooks gave me a problem. I also turned off indexing of all content types except for one and ran cron, turn on another content type and ran cron etc.
I emptied the tables above (9.).
This morning I thought that if some content with php screws up the indexing, why not turn the php filter off (and back on afterwards)?
I put the site in maintenance mode, emptied the tables above, made sure cron would start, turned off the php filter and started running cron.
Voila! It worked like a charm!
Some final notes
1. The above looks much more structured than the process in reality was. It took me close to 12 hrs to fix it.
2. The problem remains because I haven't found the bad content. Since I'm not going to reindex the site from scratch I don't think it will cause any problems (fingers crossed!).
3. Be careful when turning off the php filter. You might expose sensitive content to the public and don't forget to turn it back on! I don't have any sensitive php:ed content but you might.
4. The basic problem (at least in this case) is that I couldn't find the php code (is it?) which stopped indexing. Displaying the node id and maybe a couple of node ids before and after could be very useful when problem solving this issue.
Comment #13
Anonymous (not verified) commentedIt did helped me deleting cron_last
many thanx
Comment #14
sunilkumar commentedI have now three issues.
1) Started with Cron failiure
2) Cron still not running and admin pages are not accessible.
3) Database size is getting bigger and bigger. Then I empty cache tables manualy by myphpadmin.
It is drupal 6.13
Is all related issues?
Being a beginner, non techie, it is very difficult. :)
Regards,
-S-
Comment #15
michal-3D commentedIt is very probably related.
I have very similar problem - we have many nodes written in php, nodes inserted in other nodes. Cron keeps failing because on function is not declare, other is redeclared, etc. - things that cannot happen on the production site (using $_SESSION, .etc). Yes, it is a real trouble I even do not know, which nodes are causing it (Drupal does not say).
But I would like to run the cron (as it is so important in Drupal), but it does not make sense to unpublish all the nodes, run it, and publish them again, or does it?
Is there any way to run the cron without running it through the nodes? (only its clearing functions, etc.)
Comment #16
gdip commentedMaybe supercron could be helpful
http://drupal.org/project/supercron
Comment #17
Anonymous (not verified) commented@gdip: Does the supercron module fix the bug? Yes, looking at the project write up of the module functions it should indeed be a useful module but I still don't see that it resolves the issue.
Comment #18
sunilkumar commentedSeems to me that this command "wget http://www.kathakali.info/cron.php > /dev/null" is working!!!
http://drupal.org/node/84472
http://tczap.com/content/setup_drupal_cron_task
Regards,
-S-
Comment #19
mcrittenden commentedI'm having this problem with 6.16. Anybody else still having trouble? Any workarounds I've found haven't helped.
Comment #20
Anonymous (not verified) commented@mcrittenden: The [361171] issue may be related to this one. I suggest installing Elysia Cron to help with the issue. I ended up disabling the PHP filter module.
Comment #21
dpearcefl commentedIs this issue still occurring in the current version of Drupal v6?
Comment #22
dpearcefl commentedComment #23
aaronbaumanThis is almost certainly an issue with a contrib module or user error in a php-filtered input.
Setting to support request until this can be reliably reproduced.
Comment #24
liliplanet commentedWould be tremendous if someone perhaps has the solution to finding bad php content in D7 .. as above is for D6 ..
My upgrade from D6 somehow brought along stuff that should not be there.
Have several errors on cron run:
Notice: Trying to get property of non-object in _node_index_node() (line 2632 of /home/public_html/modules/node/node.module).EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7405 of /home/public_html/includes/common.inc).Notice: Undefined property: stdClass::$type in _node_extract_type() (line 370 of /home/public_html/modules/node/node.module).UPDATE: So far my solution for finding bad content at http://drupal.org/node/1329872#comment-5198690 works :)
Comment #25
cweagansSupport requests are never major or critical.
Comment #26
pasqualleproblem: Search module and PHP code (like drupal_goto()) in nodes
solution: Disable the PHP filter module. The module was introduced for one reason only, to be disabled.