PHP error fastcgi sent in stderr "PHP Fatal error:allowed size of" errors

Source: Internet
Author: User
Tags ini memory usage php error

The default configuration for PHP's Memory_limit value is 128M, but sometimes the following error occurs depending on what is being processed.

FastCGI sent in stderr: "PHP message:php Fatal error:allowed memory size of 134217728 bytes exhausted (tried to allocate 39858177 bytes)

You can avoid the above error by modifying the Memory_limit value.

Modify the Memory_limit value.

# Vi/etc/php.ini
; memory_limit = 128M
Memory_limit = 256M

After modifying the php.ini file, restart Apache or Nginx.

#/etc/init.d/httpd Restart # restart Apache
#/etc/init.d/nginx Restart # restart Nginx

Memory_limit =-1 for, unrestricted.

The default configuration in/etc/php.ini is as follows.

; Maximum amount of memory a script may consume (128MB)
; Http://www.php.net/manual/en/ini.core.php#ini.memory-limit
Memory_limit = 128M

The maximum memory usage of a thread, the amount of PHP that a Web request can use.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.