Out of sort memory, consider increasing server sort buffer size, see warning below.
-
A plug-in query crashing all the time because of:
Out of sort memory, consider increasing server sort buffer size, see warning below.
The developer advises βCan you contact your hosting support and ask to increase the buffer size?
https://stackoverflow.com/a/29575947 β
How can I test if this is the solution and if it is, how to make it persistent?
[09-Apr-2021 07:42:38 UTC] PHP Warning: mysqli_query(): (HY001/1038): Out of sort memory, consider increasing server sort buffer size in /***/***/public/wp-includes/wp-db.php on line 2056 [09-Apr-2021 07:42:38 UTC] WordPress databasefout Out of sort memory, consider increasing server sort buffer size bij query SELECT DISTINCT links.* FROM wp_blc_links AS links INNER JOIN wp_blc_instances AS instances USING(link_id) WHERE ( ( last_check_attempt < '2021-03-30 07:42:38' ) OR ( (broken = 1 OR being_checked = 1) AND may_recheck = 1 AND check_count < 3 AND last_check_attempt < '2021-04-09 07:12:38' ) ) AND ( instances.container_type IN ('comment', 'post', 'page', 'dummy') ) AND ( instances.parser_type IN ('link', 'image', 'metadata', 'url_field', 'acf') ) ORDER BY last_check_attempt ASC LIMIT 30 gemaakt door include('phar:///***/***/wp/php/boot-phar.php'), include('phar:///***/***/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Cron_Event_Command->run, Cron_Event_Command::run_event, do_action_ref_array('blc_cron_check_links'), WP_Hook->do_action, WP_Hook->apply_filters, wsBrokenLinkChecker->cron_check_links, wsBrokenLinkChecker->work, wsBrokenLinkChecker->get_links_to_check
-
@nebulon said in Out of sort memory, consider increasing server sort buffer size, see warning below.:
It probably should be dependent on the memory limit set for that service then?
I really don't know?
-
I haven't seen this error or mysql variable before. Reading through some other project issues like https://github.com/mozilla/addons-server/issues/15970 , it seems this happens when one tries to order by a field which is not index. In the query above, I guess
last_check_attempt
is not indexed. Can you ask the dev to maybe make an index. I think otherwise, the fix is to order with the primary key or some other indexed key.If you want to try to set that variable quickly:
docker exec -ti mysql /bin/bash
- Then, edit
/run/mysql/my.cnf
. And thensupervisorctl restart mysql
.
This won't persist reboots though.