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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

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

    WordPress (Developer)
    mysql
    3
    6
    895
    Loading More Posts
    • 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.
    • imc67
      imc67 translator last edited by girish

      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 Reply Quote 0
      • nebulon
        nebulon Staff last edited by

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

        imc67 1 Reply Last reply Reply Quote 0
        • imc67
          imc67 translator @nebulon last edited by

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

          imc67 1 Reply Last reply Reply Quote 0
          • imc67
            imc67 translator @imc67 last edited by

            @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 Reply Quote 0
            • girish
              girish Staff last edited by

              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.

              imc67 1 Reply Last reply Reply Quote 2
              • imc67
                imc67 translator @girish last edited by

                @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 Reply Quote 1
                • First post
                  Last post
                Powered by NodeBB