Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By gawas.sachin on
Hi All,
I am trying to index my site, so that my "internal site search" will improve.
1st Issue: Cron runs, but its not able to index 500 terms in one go.
2nd Issue: When I try to re-run cron.php, it fails.
How I achieve this? Thanx in advance.
__
Edited by WorldFallz - nothing to do with module development, moved to appropriate forum.
Comments
The easiest way to do this is
The easiest way to do this is to download and install the devel module, then enable the development block somewhere. In that block is a link to 'edit variables' (or something like that). In there, look for the 'cron_semaphore' variable and delete it. Then clear your cache, and try running cron again.
Thnx.. It worked for me
Once you install "Devel" and enable it, You get a "Variable editor" in "Administration Menu".
You can delete cron semaphore variable from there.
Thanx Jay Matwichuk
Cron runs, but its not able to index 500 terms in one go
Hi,
Now cron runs, but its not able to index 500 terms in one run of "cron.php".
I have over 5000 nodes to index. It's getting time consuming to delete "cron_semaphore" variable everytime, and then run the "cron.php".
Why cron not able to index 500 terms in one go?
You have any idea?
Are you on shared hosting?
Are you on shared hosting? Your host probably doesn't provide enough memory to handle it.
Set it to index 20 at a time, and have your cron run every 15 minutes or so. It will take a few hours/days but everything will get indexed.
Yes ! I am on shared hosting
I am on shared hosting.
I have set it to index 500 at a time. It's indexing about 400 terms in one go.
Probably you are right. My hosting doesn't provide enough memory.
How do I set my cron to run after every 15 minutes. Do I have to delete "cron_semaphore" variable every 15 minutes?
No. If the cron run
No. If the cron run completes, you won't need to delete that variable, it will be deleted automatically by the cron script.
As for how to increase the cron runs - that depends on how you set it up in the first place. They are running, so you must have done something to make them run. Do that again, and set them to run more often.
Cron run doesn't complete
Cron run is not completing. It shows an
I tried setting it to "20 items to index" in one run. But still it shows the above error.
That means, "cron_semaphore" not getting deleted. I have to delete it manually.
If cron_semaphore wont get delete after each "cron.php" run, setting my crontab to run "cron.php" after every 15 minutes wont matter.
If you are getting that
If you are getting that error, it means your cron is not running at all, and you have a bad configuration somewhere.
My Cron is runnning
Hi Jay,
My Cron is running but its not able to index all the terms in one go.
If I set to index 500 terms in one run, its able to index 400 terms in one go.
When I see my Index status in "Search Settings" its showing me number of nodes indexed in last cron run.
Indexing increased after each cron run.
But somehow I want to automate this "Cron Run". If every time my Cron fails, I have to delete "cron semaphore" manually and run cron.php, which I feel is mammoth task.
So don't index 500 items. Is
So don't index 500 items. Is that really so hard to figure out?
I tried setting it to 10 items
I tried setting it to 10 items in one cron run. But still i get the "Error 500 : Internal server Error". And cron had partially run before the error comes.
Sounds like you may have an
Sounds like you may have an error in one of your nodes being indexed. I've had this happen before. But the method to fix isn't something I am able to explain in a post. You'll have to track down which node this error is happening in.
thanx Jay
I must track down error.. Thanx for your quick replies
Cron run failed
Cron run failed. Please send me step how to fix this issues...