Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Out of sort memory, consider increasing server sort buffer size, see warning below.

Scheduled Pinned Locked Moved WordPress (Developer)
mysql
6 Posts 3 Posters 949 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • imc67I Offline
    imc67I Offline
    imc67 translator
    wrote on last edited by girish
    #1

    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
    
    
    1 Reply Last reply
    0
  • nebulonN Online
    nebulonN Online
    nebulon Staff
    wrote on last edited by
    #2

    Interesting, this then has to go to the mysql service. It probably should be dependent on the memory limit set for that service then?

    imc67I 1 Reply Last reply
    0
  • imc67I Offline
    imc67I Offline
    imc67 translator
    replied to nebulon on last edited by
    #3

    @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? 😞

    imc67I 1 Reply Last reply
    0
  • imc67I Offline
    imc67I Offline
    imc67 translator
    replied to imc67 on last edited by
    #4

    @girish do have a suggestion how to solve this or how to hack/test the suggestion of the plug-in developer?

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #5

    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 then supervisorctl restart mysql.

    This won't persist reboots though.

    imc67I 1 Reply Last reply
    2
  • imc67I Offline
    imc67I Offline
    imc67 translator
    replied to girish on last edited by
    #6

    @girish I requested the developers to review the query. Meanwhile I changed the setting in mysql and indeed the plugin doe work now as expected!

    1 Reply Last reply
    1

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.