• Resolved kristinubute

    (@kristinubute)


    Hi

    We are getting this message/errror in the Woocommerce/Logs

    2023-02-19T03:53:11+00:00 CRITICAL Allowed memory size of 536870912 bytes exhausted (tried to allocate 392956524 bytes) in /home/domain name/public_html/wp-includes/PHPMailer/PHPMailer.php on line 3405

    What could be causing this and HOW can we fix it ?

    It seems to cause a 503 error where we cannot access the page all of a sudden. The error log we found but not sure what is causing it.

    Very frustrating.

    Thanks

    Kristin

Viewing 15 replies - 1 through 15 (of 31 total)
  • Roxy

    (@roxannestoltz)

    Hi @kristinubute ,

    Thanks for reaching out!

    This error indicates your memory limit being exhausted. To resolve this issue you would need to increase your WordPress memory limit.

    Below are some methods to try if you would like to do this on your own, alternatively you could reach out to your host provider to do this for you:

    Edit your wp-config.php file
    Add this to the top, before the line that says, “Happy Blogging”:

    define(‘WP_MEMORY_LIMIT’, ‘1024’);

    Edit your PHP.ini file
    If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 64M try 256M:

    memory_limit = 256M ;?Maximum amount of memory a script may consume (64MB)

    Edit your .htaccess file
    If you don’t have access to PHP.ini try adding this to an .htaccess file:

    php_value memory_limit 256M

    Please see this documentation for more information.

    Should the issue persist, please can you share the following, in order to get a better understanding of your site setup:

    • System Status: which you can find via?WooCommerce?→?Status. Select?Get system report?and then?Copy for support.
    • Fatal Error log: Share a copy of any fatal error log found under WooCommerce → Status → Logs.

    Once you have these, please share them in your response here.

    Cheers!

    Same Issue, updated memory to 2Gbs still same problem, deactivated all plugins and only left Woocomerce still happening.

    Roxy

    (@roxannestoltz)

    Hi @gentlemako ,

    I understand that you are experiencing the same issue, and currently have your own topic open for support here.

    Kindly note that further support for the issue pertaining to your site will be provided there ??

    Cheers!

    Roxy

    (@roxannestoltz)

    Hi @kristinubute ,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Cheers!

    Thread Starter kristinubute

    (@kristinubute)

    Hi

    Also when I am in the Admin backend, and I try to go into a particular page to edit, or a product or something intermittently, I get “Page cannot be found’ and redirects to a blank page, even though that page 100% exists.

    Then I try and do it again and it works. Client is getting this issue too, very frustrating.

    What is causing this issue?

    I have NOT seen this happen for other clients, only just started happening for this client.

    Could this be part of the same issue causing this?

    Thanks

    Kristin

    Thread Starter kristinubute

    (@kristinubute)

    And then we get this

    Service Unavailable

    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

    Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

    Hi,

    If I am calculating this correctly, the memory size of 536870912 bytes is the equivalent to 512MB, this could not be enough depending on your site configuration.

    Also when I am in the Admin backend, and I try to go into a particular page to edit, or a product or something intermittently, I get “Page cannot be found’ and redirects to a blank page, even though that page 100% exists.

    To clarify, the error is pointing to an internal folder on your site and not a page. I’d suggest to request assistance to your web host to increase the memory limit for you.

    Feel free to let us know if you have any questions after that.

    Kind regards.

    Thread Starter kristinubute

    (@kristinubute)

    Hi

    Yes I will ask hosting to add these additional changes as you suggested below and see if it rectifies the issues.

    Edit your wp-config.php file
    Add this to the top, before the line that says, “Happy Blogging”:

    define(‘WP_MEMORY_LIMIT’, ‘1024’);

    Edit your PHP.ini file
    If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 64M try 256M:

    memory_limit = 256M ; Maximum amount of memory a script may consume (64MB)

    Edit your .htaccess file
    If you don’t have access to PHP.ini try adding this to an .htaccess file:

    php_value memory_limit 256M

    And I will let you know whether that resolves the memory exhausted issue.

    Thanks

    Kristin

    Hi @kristinubute

    Sure, take your time and let us know how that goes!

    Thanks!

    Thread Starter kristinubute

    (@kristinubute)

    Hi, I’ve spoke with the hosting people, and they say the memory is fine on hosting server.

    But I re-iterating to hosting that I keep getting memory exhausted and if they could add the coding, but they keep saying memory is fine.

    Very frustrating.

    You mentioned also about my other issue: To clarify, the error is pointing to an internal folder on your site and not a page. I’d suggest to request assistance to your web host to increase the memory limit for you.

    I tried that also and they said they are on max 512

    I still keep geting this regularly.

    2023-03-22T03:31:05+00:00 CRITICAL Allowed memory size of 536870912 bytes exhausted (tried to allocate 392956524 bytes) in /home/#/public_html/wp-includes/PHPMailer/PHPMailer.php on line 3405

    2023-03-22T03:41:25+00:00 CRITICAL Allowed memory size of 536870912 bytes exhausted (tried to allocate 812329720 bytes) in /home/#/public_html/wp-includes/PHPMailer/PHPMailer.php on line 3370

    2023-03-22T04:54:41+00:00 CRITICAL Allowed memory size of 536870912 bytes exhausted (tried to allocate 392956524 bytes) in /home/#/public_html/wp-includes/PHPMailer/PHPMailer.php on line 3405

    How do I create a PHP.ini file? Could you advise as Hosting are NOT helping at all.

    Thanks

    Kristin

    Thread Starter kristinubute

    (@kristinubute)

    Hi, I’ve just spoken to hosting again and added this line that you suggested for PHP 7.4 client currently has.

    define(‘WP_MEMORY_LIMIT’, ‘1024’);

    Error log now shows this. Is this an issue ? It has about 20 lines of this so far since we added that line.

    [23-Mar-2023 08:35:22 UTC] PHP Warning: Use of undefined constant ‘1024’ – assumed ‘‘1024’’ (this will throw an Error in a future version of PHP) in /home/#/public_html/wp-config.php on line 79

    Please advise urgently

    Thanks

    Kristin

    Thread Starter kristinubute

    (@kristinubute)

    Hosting are saying is fine .. But I tried to re-iterate it is to do with the memory on WordPress

    define(‘WP_MEMORY_LIMIT’, ‘1024’);

    @kristinubute this should be:

    define(‘WP_MEMORY_LIMIT’, ‘1024M’);

    It’s missing the “M”

    Roxy

    (@roxannestoltz)

    Hi @kristinubute ,

    As @robinrsa mentioned, the host needs to add the M after the value 1024.

    Please ask them to do this and let us know if this resolves the issue.

    Cheers!

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘CRITICAL Allowed memory size of 536870912 bytes exhausted’ is closed to new replies.