Thumbs queue isn't processing

Post Reply
gumsel
Posts: 21
Joined: Fri Jan 04, 2013 6:21 pm

Thumbs queue isn't processing

Post by gumsel »

Hi there,

I've got the same problem described at another thread, but can't find the sollution to my problem.
http://www.smartcj.com/viewtopic.php?f=2&t=88270
The queue is stuck and isn't processing. could you please help?

Gumsel
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Thumbs queue isn't processing

Post by admin »

Did you try to run update ?
any warning at Home screen ?
script messages ?
logs ?
Don't forget to run script update
gumsel
Posts: 21
Joined: Fri Jan 04, 2013 6:21 pm

Re: Thumbs queue isn't processing

Post by gumsel »

Sorry for the late reply!

We updated to version 50 over a week ago, so I guess we have the latest update. The only warning we have on the home screen is that the Cjpages PATH doesn't contain the domain name, but that's fine. The logs don't show any error messages.

Also, when we try to delete the queue, the following query is executed which runs for a very long time (more than 10 minutes):

Code: Select all

DELETE FROM rot_gallery_info WHERE gallery_md5 IN (SELECT gallery_md5 FROM rot_galleries where status = 4 or status = 11)
When I explain the query in MySQL it wants to do a table scan, which takes way too long. If I rewrite it to:

Code: Select all

DELETE rgi . * 
FROM rot_galleries rg
JOIN rot_gallery_info rgi ON rgi.gallery_md5 = rg.gallery_md5
WHERE rg.status =4
OR rg.status =11
it deletes exactly the same, and it's done in a few seconds. However, I don't know if the script wants to execute more delete (or update) queries after that, so I'm not sure if I can just execute the above query so that the queue is empty or that I will leave the database in an inconsistent state?

Hope this helps! Thanks!

Gumsel
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Thumbs queue isn't processing

Post by admin »

Hi !
Problem for this query to take more such a long time is different collation for gallery_md5 field in those 2 tables.

I've already added a fix for it in update.

You can run update and it will fix this issue.
Don't forget to run script update
gumsel
Posts: 21
Joined: Fri Jan 04, 2013 6:21 pm

Re: Thumbs queue isn't processing

Post by gumsel »

Hi!

Thanks for the reply. That was definitely the solution. However, another query was also executed:

Code: Select all

DELETE FROM rot_gallery_data WHERE gallery_md5 IN (SELECT gallery_md5 FROM rot_galleries where status = 4 or status = 11)
that also took really long. I changed the collation of the gallery_md5 column in the rot_gallery_data table to the same collation as the other tables and it worked perfectly. Perhaps you also want to put that in your update script?

Thanks again!


Cheers,
Gumsel
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Thumbs queue isn't processing

Post by admin »

It's already there.
Don't forget to run script update
Post Reply