Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes)

What issue or error are you experiencing?

Hello, trying to go to a page on my site, after a long load, I get this error: Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in C:\Us\thoma\Local Sites\carnews-france\app\public\wp-includes\class-wpdb.php on line 2320

I wanted to follow this link but there is nothing to enter on line 2320. In this forum, I followed the tutorial to modify the php.ini.hbs but nothing changes and I don’t know what max value is needed, I put this :

; Maxes
max_execution_time = 50000
max_input_time = 10000
max_input_vars = 19000
memory_limit = 15000M
post_max_size = 1000M
max_file_uploads = 20
output_buffering = 4096

Can you help me? Thanks a lot! :slight_smile:

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @Thomas91

It sounds like your site is creating a memory leak. I would start by disabling plugins, or swapping out the theme and see if that works. You might have to do some testing by disabling plugins and enabling them one at a time to see when it crashes. You can do this using CLI by clicking on Open Site Shell.

If you can access the backend after disabling all plugins you can also use this plugin to check memory usage as you turn them back on:

Hello,

thank you very much for your feedback. For your information, this only happens on one page, not on the rest of the site.

It’s strange indeed, I’m going to deactivate and reactivate the plugins one by one to see which one seems to be in conflict and causing such a problem.

I’ll come back here once I’ve found a solution

Ok, so, there is a problemn with SERVER IP & MEMORY USAGE DISPLAY, it tell me

| Memory: 272 of 768 MB (35%) | WP LIMIT: 768 Mo | IP 127.0.0.1 (DESKTOP-CGV7UEF) | PHP 8.3.0 @64BitOS

And in php.ini.hbs i don’t found “768Mo” in this file. It’s very weird

I must to improve “Limit of PHP memory”, it’s 768Mo but in “Local” i don’t found this parameter because i make ; Maxes
max_execution_time = 50000
max_input_time = 10000
max_input_vars = 19000
memory_limit = 15000M
post_max_size = 1000M
max_file_uploads = 20
output_buffering = 4096

Ok, it’s good now, i make 15000M in wp-config.php in local folder and all it’s ok ! :slight_smile:

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.

Glad to hear it @Thomas91! Thank you for the updates :green_heart: