Title: Optimizer hangs indefinately
Last modified: August 30, 2016

---

# Optimizer hangs indefinately

 *  Resolved [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/)
 * I just run the optimizer and it just stays ‘waiting for server’. The results 
   never appear.
    Also WordPress front end and admin become unresponsive. The only
   way I can regain control is to restart MySQL.
 * [https://wordpress.org/plugins/rvg-optimize-database/](https://wordpress.org/plugins/rvg-optimize-database/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530319)
 * This is the error I get in the apache log:
 * `WordPress database error Out of sort memory, consider increasing server sort
   buffer size for query \r\n\t\t\t SELECT`ID`AS id, 'post' AS post_type,`post_title`
   AS title,`post_modified`AS modified\r\n\t\t\t\t FROM kv5zet1n_3_posts\r\n\t\t\
   t\tWHERE`post_status`= 'trash'\r\n\t\t\tUNION ALL\r\n\t\t\t SELECT`comment_ID`
   AS id, 'comment' AS post_type,`comment_author_IP`AS title,`comment_date`AS modified\
   r\n\t\t\t\t FROM kv5zet1n_3_comments\r\n\t\t\t\tWHERE`comment_approved`= 'trash'\
   r\n\t\t\t ORDER BY post_type, UCASE(title)\t\t\r\n\t\t\t made by require_once('
   C:\\UniServerZ\\www\\kcwww\\wordpress\\wp-admin\\admin.php'), do_action('tools_page_rvg-
   optimize-db'), call_user_func_array, rvg_optimize_db, rvg_get_trash, referer:
   http://www.mysite.com/wp-admin/tools.php?page=rvg-optimize-db.php`
 * I’ve upped the sort buffer size to 256K but it still falls over.
 *  Thread Starter [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530323)
 * In phpMyAdmin, the above query returns instantly with zero rows and no errors.
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530328)
 * Hey iltdevunit,
 * That’s a strange problem…
    Hasn’t been reported before.
 * It must be some MySQL issue.
    Maybe a stupid question but did you restart MySQL
   after making the memory changes?
 * peace,
    Rolf
 *  [trevor67](https://wordpress.org/support/users/trevor67/)
 * (@trevor67)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530409)
 * I just updated to the latest version, today, and I’m having the exact same problem.
   However, there are no errors in the webserver logs. FYI I’m running multisite.
   The plugin has worked flawlessly for me prior to this.
 * Please advise for any specific information I can provide which may help troubleshoot.
 * Thanks,
    Trevor
 *  Thread Starter [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530422)
 * Hi Rolf,
 * Yes I restarted both MySQL and Apache. I too am running on a multisite.
 * Cheers.
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530432)
 * Hey guys,
 * The major change in the latest version is the way expired transients are being
   deleted.
 * So, what happens when you uncheck the ‘Delete expired transients’ checkbox (on
   the settings page)?
 * Does that fix the problem?
 * peace,
    Rolf
 *  [valuser](https://wordpress.org/support/users/valuser/)
 * (@valuser)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530456)
 * +1
 * on a local install
 * > So, what happens when you uncheck the ‘Delete expired transients’ checkbox (
   > on the settings page)?
   > Does that fix the problem?
 *  the operations now complete their work.
 * but now white screen (have backup)
 *  Thread Starter [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530466)
 * Runs fine for me without ‘Delete expired transients’ checked too 🙂
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530467)
 * Hey guys,
 * I’m able to reproduce the problem now.
 * It’s a very strange problem but I’m working on a fix.
 * peace,
    Rolf
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530475)
 * Hey guys,
 * Found the bug and killed it 😉
 * Update to v3.4.8 and you should be fine.
 * peace,
    Rolf
 *  Thread Starter [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530483)
 * Fantastic!
 * I’ve tested the updated version and everything works perfectly.
 * Thanks Rolf.
 *  [valuser](https://wordpress.org/support/users/valuser/)
 * (@valuser)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530488)
 * Ditto
 * Really excellent
    Many Thanks

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Optimizer hangs indefinately’ is closed to new replies.

 * ![](https://ps.w.org/rvg-optimize-database/assets/icon-256x256.png?rev=3350597)
 * [Optimize Database after Deleting Revisions](https://wordpress.org/plugins/rvg-optimize-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rvg-optimize-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rvg-optimize-database/)
 * [Active Topics](https://wordpress.org/support/plugin/rvg-optimize-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rvg-optimize-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rvg-optimize-database/reviews/)

 * 12 replies
 * 4 participants
 * Last reply from: [valuser](https://wordpress.org/support/users/valuser/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/optimizer-hangs-indefinately/#post-6530488)
 * Status: resolved