PHP Fatal error: Allowed memory size of exhausted

Created on 10 July 2024, 3 days ago

Problem/Motivation

PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted

I checked the php-fpm log and received the following message:

PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 28672 bytes) in /home/....com/public_html/.../includes/cache.inc on line 361
 PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 262144 bytes) in /home/....com/public_html/.../includes/database/database.inc on line 731
 PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 16384 bytes) in /home/....com/public_html/.../includes/cache.inc on line 449
 PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 16384 bytes) in /home/....com/public_html/.../includes/cache.inc on line 449
 PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 16384 bytes) in /home/....com/public_html/.../includes/cache.inc on line 449
 PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 20480 bytes) in /home/....com/public_html/.../includes/cache.inc on line 449
 PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 16384 bytes) in /home/....com/public_html/.../includes/cache.inc on line 449
 PHP Fatal error:  Allowed memory size of 4294967296 bytes exhausted (tried to allocate 32768 bytes) in /home/....com/public_html/.../includes/database/database.inc on line 2284

My current php.ini file is as follows:

PHP version:	7.4.33
PHP memory_limit:	4G
PHP post_max_size:	16M
PHP upload_max_filesize:	4M
PHP max_input_vars:	1000
PHP max_execution_time:	60

And:
OS: Almalinux 9,
webserver: Apache
Drupal version: V 7.101

I tried adjusting the memory_limit parameter in php.ini to 7GB and received the following error message

PHP Fatal error:  Allowed memory size of 7516192768 bytes exhausted (tried to allocate 32768 bytes) in /home/.....com/public_html/..../includes/cache.inc on line 361
PHP Fatal error:  Allowed memory size of 7516192768 bytes exhausted (tried to allocate 20480 bytes) in /home/.....com/public_html/..../includes/cache.inc on line 449
PHP Fatal error:  Allowed memory size of 7516192768 bytes exhausted (tried to allocate 20480 bytes) in /home/.....com/public_html/..../includes/cache.inc on line 449
PHP Fatal error:  Allowed memory size of 7516192768 bytes exhausted (tried to allocate 20480 bytes) in /home/.....com/public_html/..../includes/cache.inc on line 449
PHP Fatal error:  Allowed memory size of 7516192768 bytes exhausted (tried to allocate 20480 bytes) in /home/.....com/public_html/..../includes/cache.inc on line 449
PHP Fatal error:  Allowed memory size of 7516192768 bytes exhausted (tried to allocate 262144 bytes) in /home/.....com/public_html/..../includes/database/database.inc on line 731

Please help me!!

πŸ› Bug report
Status

Postponed: needs info

Version

7.0 ⚰️

Component
CacheΒ  β†’

Last updated about 2 hours ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Postponed: needs info 3 days ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Welcome to the Drupal Community. What you see there isn't normal. When PHP runs out of memory it can be difficult to interpret the error line because that is just the point at which PHP completely ran out of memory. The cause is sometimes elsewhere.

    But reports like this require steps to reproduce. Because this bug report is missing those I am postponing the issue on more information.

  • I also don't understand what's going on. After I updated from version 7.94 to version 7.101, the php-fpm log reported the same. At first I thought it was because the memory_limit parameter was not enough, so I changed it from 1024MB -> 3GB but that message still PHP Fatal error appeared, and I continued to change from 3GB->4GB but the message still appeared in the log.

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Probably no amount of allocated memory will be enough as there is likely a code issue here. But you have not added steps to reproduce to this issue. For example, we don't even know on which page, or even on which kind of page, your error occurs. We don't know which modules are installed, and so on.

Production build 0.69.0 2024