Error Empty WP YouTube Lyte’s cache
-
It damages my database by using the “Empty WP YouTube Lyte’s cache” option.
The table in post_meta is broken and the repair fails.I had to install the site for a backup. Three times with the same result.
-
ouch, sorry about that @wintertal, will try on my own site to see if i can reproduce!
can’t reproduce, did a quick review of the code and this should not happen as I’m simply calling
delete_post_meta($postID, $cachekey);where $cachekey is
'_lyte_' . $vid;maybe somethhing specific to the set of video’s you’re showing, would you happen to have a list of videos you’ve got in the cache? I could try adding those to my test-site and see if that would allow me to reproduce?
Of course, only that there are more than 15 thousand videos of Youtube, maybe it does not finish the process and it collapses in the server. Then the mysql request is blocked, so could it be done in batches?
-
This reply was modified 9 years, 3 months ago by
windertal.
15000 … wow. and is post_meta an ISAM or innoDB table in your case?
oh and what is your PHP timeout threshold?
The post_meta table is MyISAM, max_execution_time 30, the memory limit: 128M
and I suppose you got an error-page (timeout) approx. 30s after submitting the lyte-adminpage with the “purge cache” option active?
Yes, it tells me that you can not connect to the database. At other times it does not enter and is stuck
OK, I think the problem is the large (huge) number of youtube video’s results in the purge timing out, possibly leaving the post_meta table in a locked state (which is due to MyISAM doing table locking as opposed to InnoDB doing row-locking).
I have _an idea_ of how to work around this (by doing it in batches of 500 deletes and doing this with a wp_cronned task that runs every minute or so if the previous task finished), but this is not simple and I will not have this soon I’m afraid …
Did you indeed want to delete _all_ of lyte’s cache, or was the goal to remove _some_ of it (because there’s another way to do this on a per post-basis)?
If indeed I want to eliminate everything to make a backup. Then reduce the database by having the backup of it. The cron task seems like a very good option. Anyway what do you recommend?
Thanks for the help I actually speak Spanish. The best would be to remove blocks of 500 cache records per request.
OK, I’ll probably write you a custom Lyte-cachecleaner soon(-ish), which might end up in Lyte proper later.
(I actually speak Dutch, but also French & English and even a little bit of Spanish & Italian, but I think English would be our safest choice here π )
Multiple languages, when you need to practice Spanish, you tell me. But if it is good for you to do database backup that is high priority
My database grows and grows haha. I hope that there is a good solution. Batch job could be.
just so you know; what i’m working on is an update of the lyte_rm_cache function, which will purge the lyte-post_meta for a maximum of 250 posts at a time. at that point the purge stops and a message will be shown on the admin-screen to confirm the purge is (only) partially done, inviting to purge again. i’ll probably have this ready (in a first version) this weekend.
-
This reply was modified 9 years, 3 months ago by
The topic ‘Error Empty WP YouTube Lyte’s cache’ is closed to new replies.