Title: Database errors
Last modified: January 26, 2022

---

# Database errors

 *  Resolved [therealgilles](https://wordpress.org/support/users/chamois_blanc/)
 * (@chamois_blanc)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/database-errors-73/)
 * I am getting the following database errors. Do I really have to tweak the server
   buffer size, or is there something more at play here? I only have 154 log messages(
   which are not currently being displayed due to the errors). Thank you for any
   advice.
 *     ```
       [26-Jan-2022 22:39:20 UTC] WordPress database error Out of sort memory, consider increasing server sort buffer size for query SELECT id, time, email_to, subject, message,
                   status, error, backtrace_segment, attachments,
                   additional_headers
                   FROM wp_mail_catcher_logs ORDER BY time DESC LIMIT 5
                      OFFSET 0 made by edit_user, wp_update_user, wp_mail, apply_filters('wp_mail'), WP_Hook->apply_filters, WpMailCatcher\Loggers\WpMail->recordMail, WpMailCatcher\Loggers\WpMail->saveMail, WpMailCatcher\Models\Logs::getFirst, WpMailCatcher\Models\Logs::get
       [26-Jan-2022 22:39:20 UTC] WordPress database error Out of sort memory, consider increasing server sort buffer size for query SELECT id, time, email_to, subject, message,
                   status, error, backtrace_segment, attachments,
                   additional_headers
                   FROM wp_mail_catcher_logs ORDER BY time DESC LIMIT 5
                      OFFSET 0 made by edit_user, wp_update_user, wp_mail, do_action('wp_mail_failed'), WP_Hook->do_action, WP_Hook->apply_filters, WpMailCatcher\Loggers\WpMail->recordError, WpMailCatcher\Loggers\WpMail->saveError, WpMailCatcher\Models\Logs::getFirst, WpMailCatcher\Models\Logs::get
       [26-Jan-2022 22:39:20 UTC] WordPress database error Out of sort memory, consider increasing server sort buffer size for query SELECT id, time, email_to, subject, message,
                   status, error, backtrace_segment, attachments,
                   additional_headers
                   FROM wp_mail_catcher_logs ORDER BY time DESC LIMIT 5
                      OFFSET 0 made by edit_user, wp_update_user, wp_mail, apply_filters('wp_mail'), WP_Hook->apply_filters, WpMailCatcher\Loggers\WpMail->recordMail, WpMailCatcher\Loggers\WpMail->saveMail, WpMailCatcher\Models\Logs::getFirst, WpMailCatcher\Models\Logs::get
       [26-Jan-2022 22:39:20 UTC] WordPress database error Out of sort memory, consider increasing server sort buffer size for query SELECT id, time, email_to, subject, message,
                   status, error, backtrace_segment, attachments,
                   additional_headers
       ```
   

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

 *  Thread Starter [therealgilles](https://wordpress.org/support/users/chamois_blanc/)
 * (@chamois_blanc)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/database-errors-73/#post-15295766)
 * I increased the mysql sort_buffer_size to 2M and the error went away. What’s 
   a good value for sort_buffer_size?
 *  [Mizuho Ogino](https://wordpress.org/support/users/fishpie/)
 * (@fishpie)
 * [4 years ago](https://wordpress.org/support/topic/database-errors-73/#post-15476018)
 * Hi.
    Most hosting providers offer 1M sort_buffer_size. I think it’s enough for
   the ordinary website.
 * I am having exactly the same issue with you and this has happened because the
   site is made by woocommerce and there are dozens of html emails a day. The 1M
   sort memory causes the error on the web site and phpMyAdmin too.
 * I really love this plugin and want to continue using it. If possible, please 
   update to the specification using Ajax when an user views details.
 *  Plugin Author [JWardee](https://wordpress.org/support/users/wardee/)
 * (@wardee)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/database-errors-73/#post-15571876)
 * Yes this will happen when you load logs where the emails are particularly large.
   As [@fishpie](https://wordpress.org/support/users/fishpie/) mentions this is 
   much more likely to happen on a site that uses lots of html emails – like WooCommerce.
 * I’ve made a note of the issue but for the time being you can either restrict 
   the amount of logs visible on the overview page by clicking “Screen options” 
   in the top right and reducing the number of logs seen per page. Or increasing
   the sort_buffer_size as you mentioned. I hope this helps!

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

The topic ‘Database errors’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-catcher/assets/icon.svg?rev=2221293)
 * [Mail logging - WP Mail Catcher](https://wordpress.org/plugins/wp-mail-catcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-catcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-catcher/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-catcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-catcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-catcher/reviews/)

## Tags

 * [buffer](https://wordpress.org/support/topic-tag/buffer/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)

 * 3 replies
 * 3 participants
 * Last reply from: [JWardee](https://wordpress.org/support/users/wardee/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/database-errors-73/#post-15571876)
 * Status: resolved