Pingback makes that cron.php don't stop never.

Well, actually it stops and show this error:
"Cron run exceeded the time limit and was aborted."

If i disable pingback module the cron work well.

Until now pingback worked well, ¿maybe a special link has broken pingback?

Comments

andreashaugstrup’s picture

Category: bug » support

Can you do anything to troubleshoot this issue further? I've not run into this problem before. Do you have a post in the queue with an excessive amount of links? In that case go to the settings page and lower the amount of links to check per cron run and see if that helps.

Carlitus’s picture

I've put 1 link per cron and still works wrong.

I think the problem maybe that the module tries to ping some link with problems when receiving pings.

funana’s picture

Same here. The "When creating and updating nodes" option works, but it slows down the saving process of nodes, so it's not a good idea imho. I will set it to "never" for now.

Unfortunately this is only used at D5 site and currently upgrade to D6 is not an option for the site.

Dave Reid’s picture

I've also run into this problem. I had a problem with cron running forever on some of my sites and after doing a bit of debugging within drupal_run_cron, it was linked back to pingback_cron() that was taking forever. Once I disabled pingback, cron instantly worked.

BarisW’s picture

I can confirm this issue. My cron stopped working since I installed this module. Any tips to solve this?

Anonymous’s picture

Issue tags: +cron trouble

Subscribe

Dave Reid’s picture

Priority: Normal » Critical

Bumping to critical because this prevents drupal's cron system from running properly.

esarantopoulos’s picture

Same here, Cron won't run!!!

andykisaragi’s picture

Similar issue here, though for me it is exceeding the allowed memory rather than the time limit. Happens to me whatever setting I use for autoping (even 'Never'), disabling pingback module makes cron run fine again...

any ideas???

gagarine’s picture

track

Dave Reid’s picture

Assigned: Unassigned » Dave Reid
Thoor’s picture

Having the same problem ... CRON does not end, when activating the PINGBACK Module.

AlexisWilke’s picture

Hi Dave,

I looked at the code, but did not check the CRON feature directly. There is a definitive bug in the while() loop which eats one too many $nid in the $q[ueue]. This is from the 2.x-dev version. Was that version abandoned? Or are you working on that version and not 1.x?

In any event, the loop is really ugly, but the ($nid = array_shift($q)) part MUST be second to not lose one of the $nid.

function pingback_cron() {
  $q = variable_get('pingback_nid_queue', array());
  $limit = variable_get('pingback_check_per_cron', 30);
  $count = 0;
  while (($count++ < $limit) && ($nid = array_shift($q))) {
    pingback_send_by_nid($nid, FALSE);
  }
  variable_set('pingback_nid_queue', $q);
}

Otherwise I do not see how this one could possibly lock-up (outside of the fact that an XML-RPC can take forever if the timeout is too large.)

Would you please show the current development version on the front page? The one you are working on that is. And if you need a hand let me know, I probably can squeeze a little time on this one.

Thank you.
Alexis

degauss’s picture

Also bitten by this problem since I updated my Debian box to Squeeze, which raises PHP memory from 32M (which used to work) to 128M (which no longer does). Raising it to 512M doesn't fix the issue, so I guess there may be some memory-consuming infinite loop. Lowering the number of checks to 1 or disabling cron autoping doesn't fix the issue. Disabling the pingback does avoid the problem. (I've spotted the problem by using this hint.)