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

Jaypan’s picture

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.

gawas.sachin’s picture

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

gawas.sachin’s picture

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?

Jaypan’s picture

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.

gawas.sachin’s picture

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?

Jaypan’s picture

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.

gawas.sachin’s picture

Cron run is not completing. It shows an

500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
blah blah .....

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.

Jaypan’s picture

If you are getting that error, it means your cron is not running at all, and you have a bad configuration somewhere.

gawas.sachin’s picture

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.

Jaypan’s picture

So don't index 500 items. Is that really so hard to figure out?

gawas.sachin’s picture

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.

Jaypan’s picture

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.

gawas.sachin’s picture

I must track down error.. Thanx for your quick replies

morungexpress’s picture

Cron run failed. Please send me step how to fix this issues...