System & Maintenance Jobs Won't Stop Running

Permalink 2 users found helpful
Hi all,

So, on one of my sites, I recently ran the default "Scheduled Jobs" under System& Maintenance on the dashboard.

Strangely, step 1, Index Search Engine, has been running for over a day now. There is a little spinning wheel icon next to it, and it says the started time was 9AM yesterday.

I can click "Run Checked", and it re-runs the tasks, and completes tasks 2 and 3, but task 1 (Index Search Engine) just keeps on going. Is it really stuck running? And how should I resolve this? I'm worried about the implications this may have for memory usage on the server, or otherwise.

Thanks in advance

 
cyandesigns replied on at Permalink Reply
I've had this issue with the email job.

I copied the job url (at the bottom of that screen) and pasted it into my browser and ran it that way. Once it finally loaded it stopped the job on that screen.

Don't know why - it just worked. I don't think it had any effect on memory usage though...

Hope that helps!
benradler replied on at Permalink Reply
I tried that already, unfortunately. Here's the error I get:

Fatal error: Call to a member function getInstance() on a non-object in /home/wvi/westlakevillageinn.com/updates/concrete5.4.1/concrete/libraries/database_indexed_search.php on line 137


Additionally, I noticed that the site keeps getting flagged by Dreamhost for using having too many processes running. I wonder if it's related?

I may try copying the entire site and a MYSQL db dump to localhost and seeing if it's still trying to index. If not, maybe I'll throw a new instance of the MYSQL db up on the server and see if linking it up helps at all.
hursey013 replied on at Permalink Reply
hursey013
I had this problem and found it was related to the memory limit set in php.ini. I noticed on larger sites with a lot of pages, the index search engine job needs a fair amount of juice to run. You can see the post here:http://www.concrete5.org/community/forums/customizing_c5/index-sear...
benradler replied on at Permalink Reply
Unfortunately, even increasing the php_value memory_limit to 128M doesn't fix the problem -- the "index search engine" just keeps on spinning forever and ever.

I'm really having problems with this -- in fact, it's caused Dreamhost to pull the plug on the site several times over the last two weeks.

Any other recommendations are really appreciated, especially since it's nearly impossible to get anyone from dreamhost to respond to you. Is it possible that changing the php_value memory_limit in .htaccess isn't overriding the php.ini file on dreamhost?
jbx replied on at Permalink Reply
jbx
Couple of things to try...

Firstly, the spinner in the dashboard is no indication that the job is actually running - just that nothing told the spinner to stop spinning! Go to your database in phpMyAdmin and browse the Jobs table. The job statuses should all be 'ENABLED'. Change them if they're not. This should stop the spinner spinning.

Secondly, the cause of the issue... I've found that this is usually a corrupt object cache. You didn't mention which version of C5 you are running?? Try deleting EVERYTHING from inside files/cache and (if_exists) files/cache_objects. Then re-run the job from the dashboard.

Lemme know how you get on!

Jon
benradler replied on at Permalink Reply
Hey jbx -- thanks for the reply =)

Checked the jobs table before -- it is indeed set to "RUNNING".

If I delete everything inside /files/cache and /files/cache_objects will there potentially be any ill-effects on the site? The site is live.

Also, you mean /files/cache not /concrete/files/cache, correct?
jbx replied on at Permalink Reply
jbx
The only ill effect is that your cache will be cleared, so a very minor performance hit on the pages while the cache is rebuilt. That should be all...

And yes, /files/cache/, don't delete anything inside your concrete folder! And ensure you don't delete the folders themselves either!

Jon
benradler replied on at Permalink Reply
Still spinning its little heart away! I appreciate the suggestions, but still having the same problem after dumping the cache folder and recreating it.

Also, I get this error if I try to access the direct URL to run the jobs
Fatal error: Call to a member function getInstance() on a non-object in /home/wvi/westlakevillageinn.com/updates/concrete5.4.1/concrete/libraries/database_indexed_search.php on line 137


Any other ideas?
jbx replied on at Permalink Reply
jbx
Well you should be able to stop the spinner again with the db update from before.

Then try this:http://www.concrete5.org/community/forums/chat/scheduled-jobs-like-...
jbx replied on at Permalink Reply
jbx
hmmm, digging a little further, it looks like the specific error refers to a broken reference to a missing block of some kind. Have you recently deleted any blocks or packages?

I'll keep digging...

Jon
benradler replied on at Permalink Reply
By the way, I'm running 5.4.1.

I'm not really clear on that solution -- did he say he replaced his /models directory with a clean copy?

I notice the error I posted in my previous reply is being pulled from the /updates directory...is this normal?

I would be happy to reinstall a clean copy of C5, but I'm not sure if there's an easy way to rebuild the site structure and pages without doing it from scratch?

Also, I'm on dreamhost, not bluehost. There is no SimpleScripts or cpanel.

I removed the ProBlog package recently, but that shouldn't affect my whole C5 installation...I also recently installed ProEvents.

Thanks again for your assistance, Jon!
benradler replied on at Permalink Reply
I'm literally at a loss here, and it's causing real problems for my client.

Does anyone have any ideas as to the next steps I should take save for rebuilding the entire site?
hostco replied on at Permalink Reply
hostco
I thought I was one of the only ones with this issue but it seems that there are more and more people stepping forward as of late. It looks like some of the fixes mentioned work for some people however we have a few sites acting this way and have tried all the suggestions listed above and more but are still getting the same results as you.

Im not sure that this is causing any issues as far as the issues with your host though. With WHM/Cpanel you can monitor processes and there does not seems to be any stuck processes even though the animated .gif is still spinning in the dashboard.

Maybe Concrete5 needs to look at one of the un-fixable sites like we have to figure out what is really going on. This looks like an issue that is coming up often now.
RadiantWeb replied on at Permalink Reply
RadiantWeb
I have this issue on one site as well.

C
benradler replied on at Permalink Reply
Okay, this is obviously a serious bug, since several people here have reported this issue.

Can someone from the official C5 team chime in? I may try emailing Franz or Andrew, as they had been responsive to my email in the past.
phaselbo replied on at Permalink Reply
Hi

I'm facing the smae problems!!
I hope their ll be soon a solution.

Philipp
ecomatt replied on at Permalink Reply
ecomatt
i have the same issue and have rebuilt the search index through Mysql and taken everything off the list to be indexed and it will run but then it stoops again and as far as i can see it may have something to do with eater the tweet plugin or the arrows navigation block???

any ideas anyone? i have re installed both but no luck.
abstracts replied on at Permalink Reply
abstracts
Yep - I also have the same issue. Been running since last Sunday night and still spinning. I've cleared the caches numerous times and the server has even been restarted since but that made no difference.

In my case it was after I had to manually remove lots of pages from the Blog add-on after it went haywire duplicating posts after the 5.4.1 update. I ran the re-index to update everything. Since then I've had issues with javascript with one add-on (Billboards) and currently cannot any products to the cart in eCommerce - not sure if any of this is related.
Cravener replied on at Permalink Reply
Cravener
I also have this issue on one site.
creativeorange replied on at Permalink Reply
creativeorange
Yup. Having the same problems. I've tried the below suggestions with no luck. At last the site didn't break. It's had mine spinning for 3 months now. It doesn't seem to get in the way of the functionality of the site at least.
senshidigital replied on at Permalink Reply
senshidigital
I have this issue on a site now.

Any news on how to solve it?
senshidigital replied on at Permalink Reply
senshidigital
I have tried increasing the memory as suggested above... still no joy. The site has 81 pages to index but can't. I get a similar error when running the link in a browser.

If it helps I get the following java error:

SyntaxError: Parse error
creativeorange replied on at Permalink Reply
creativeorange
I was able to resolve this on my site. What happened was that I accidentally copies all of my concrete/controller/ files into the /controller/ folder. Once I removed the unnecessary files, the Add Block worked perfectly.

Hope that helps!
senshidigital replied on at Permalink Best Answer Reply
senshidigital
OK guys I found a way of fixing this.

The file:

/concrete/libraries/database_indexed_search.php

Copy this into your top level libraries folder and change the following code:

$bi = $b->getInstance();
if (!is_object($b)) {
   continue;
}


to this:

if (!is_object($b)) {
   continue;
} else {
   $bi = $b->getInstance();
}


This worked for me!

Thanks to pixelhander for this.
creativeorange replied on at Permalink Reply
creativeorange
This is the coder-wannabe having a bit of trouble. I can't find the code specified. The closest I can find is the following:

$bi = $b->getInstance();
 if(method_exists($bi,'getSearchableContent')){
  $searchableContent = $bi->getSearchableContent();  
  if(strlen(trim($searchableContent)))                
    $text .= strip_tags(str_ireplace($tagsToSpaces,' ',$searchableContent)).' ';
}


this is from the database_indexed_search.php file.

Thanks!
senshidigital replied on at Permalink Reply
senshidigital
The code I posted should be around line 137
markm replied on at Permalink Reply
Additionally, once the revised code are placed in the .php file, I noticed that the spinner kept doing its thing. To 'reset' the job, I found that running the automated job URL with the following at the end of that URL, does the trick.

&force=1


My blog post on the topic -http://nwlinux.co/7V
dwayneparton replied on at Permalink Reply
dwayneparton
Had the same problem. Thanks dojo for the solution.
abstracts replied on at Permalink Reply
abstracts
Thanks Dojo - finally worked for me too with the force=1 added to the automated url.
TheRealSean replied on at Permalink Reply
TheRealSean
You are running a much older version of the code, comment out that bit you mentioned and replace with the new code and that should work.
(I found a site with the same code back from 1.3.2.2)