• Hey

    I have been using Better Search Replace for many years and I had had no need to contact support for a very long time. I am struggling with the

    “An error occurred processing your request. Try decreasing the “Max Page Size”, or contact support.”

    Even if I turn it down to 3000 and add a define( ‘WP_MEMORY_LIMIT’, ‘512M’ ); to the wp-config file and do a few hard refreshes it is still giving me the same error. When I search through the database it gets about half way before the error shows up.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi there!

    Better Search Replace Support Team here, Thanks for reaching out with your query we would be happy to assist

    Have you tried setting the “Max Page Size” to its lowest possible value of 1000?

    If yes and the issue persists, can you try editing your wp-config.php file to replace this line –

    define( 'WP_DEBUG', false );

    With these lines –

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);


    This means that any errors are logged to /wp-content/debug.log, because some errors are not visible on screen.

    Can you try the process again and then send on the debug.log file if created please.

    More details about that at http://codex.wordpress.org/Editing_wp-config.php#Debug

    Thread Starter Paal Joachim Romdahl

    (@paaljoachim)

    Hmm this is strange I add the

    define(‘WP_DEBUG’, true); // Turn on WP Debugging
    define(‘WP_DEBUG_LOG’, true); // Log errors to wp_debug.log
    define(‘WP_DEBUG_DISPLAY’, false); // Turns off error reporting on the front end

    To the wp-config. Run the search and replace operation again. Get the error even on the lowest value of 1000. Then check the wp-content folder and do not see the debug log. I will have to contact the web host and ask about this.

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi Paal,

    You may also check the Help tab of Better Search Replace to confirm that WP_DEBUG is recognized as activated by the plugin.

    Let us know how it goes for you.

    I’m running into this same issue and was able to download the debug file, this is what I got:

    20:29:30 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 335872 bytes) in /home/h9cmpsjnotqu/public_html/staging-mentalhealthismaternalhealth.nektormedia.com/wp-includes/class-wpdb.php on line 2320

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @nektorsean ,

    Better Search Replace Support Team here. Thanks for reaching out with your query, we would be happy to assist!

    That error means that you are reaching your server’s memory limit. Please try increasing your WP_MEMORY_LIMIT to 256M or greater if you keep getting the error.

    https://deliciousbrains.com/wp-migrate-db-pro/doc/memory-issues/#wordpress-memory-limit

    You may have to contact your hosting provider for help in increasing the value.

    Let us know if you have any other questions.

    I’m having the same problem. I added the magic 3 lines to wpconfig and WP_DEBUG now shows as ENABLED. Memory is already at 512M.

    Anything else I can try?

    Thinking it has to do with the length of the string being searched for and/or the length of the string being replaced, I did some tests.

    I have about 560 replacements (one per page/post) of a string that is 177 characters, replacing it with a string that is 71 characters.

    Thinking those strings were too long, I cut it down to replacing a string of 40 characters with one of 12 characters. That should be well within the limits of the plugin.

    It still tells me to decrease the Max Page Size. So, maybe it’s incapable of handling 560 replacements in one shot???

    Is it possible to break it down so it does just 100 replacements at a time?

    Do you know how many characters is the max string for searching and the max for replacing, and do you know the max number of replacements for one search/replace query??

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @hunter44 ,

    It’s possible that you have one record in your database that is very large. Better Search Replace (BSR) uses your server’s memory to temporarily store this data as our plugin performs the search/replace, so it’s possible that your server’s memory couldn’t accommodate it.

    One way to test this is to try running search/replace a few tables at a time, to see where it could be failing.

    “Do you know how many characters is the max string for searching and the max for replacing, and do you know the max number of replacements for one search/replace query??”
    — The lengths of the search and replace parameters are limited by your server’s Post Max Size. I think most servers have a Post Max Size value large enough to accommodate simple text strings.

    There really isn’t a maximum number of replacements per search/replace query. You may be limited by your server’s memory limit, or your server’s max_execution_time. BSR runs the search/replace by batches to try to ensure that it doesn’t go over your server’s limits.

    Let us know if you have any other questions.

    tetzas

    (@tetzas)

    Hi there support team,

    I don’t know if it helps but, on my case I noticed the error occurs on wpmkpostmeta.

    If I don’t select it, everything works fine.

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @tetzas,

    In your case, you may need to check if there are any large rows/records on your postmeta table.

    Have you already tried setting the “Max Page Size” to its lowest possible value of 1000?

    If so, enabling WP_DEBUG and WP_DEBUG_LOG might help identify the actual issue with that table.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.