In The php-fpm + nginx environment, only The page you are looking for is temporarily unavailable is displayed.

Source: Internet
Author: User
Tags fpm php and php error

When I upgraded wordpress today, The error "The page you are looking for is temporarily unavailable" suddenly occurred, however, no php error information is found in the logs of php, php-fpm, and nginx. the display_errors in ini does not display a php error. If you write a phpinfo file under the root directory of the website, it will run normally. If you restart php, the website access will be normal after nginx is restarted.

During the wordpress upgrade process, too many php-cgi processes were generated due to time consumption.

Netstat-anpo | grep "php-cgi" | wc-l

Command to view the result output 0, indicating that the number of PHP FastCGI processes is too large. Modify the scgi_params file in the nginx conf directory, and change the default scgi_param SCGI 1 to scgi_param SCGI 5 ;. You can also set a longer time-out period for fastcgi in nginx. conf, for example:

Http {
Fastcgi_connect_timeout 300;
Fastcgi_send_timeout 300;
Fastcgi_read_timeout 300;
Fastcgi_buffer_size 64 k;
Fastcgi_buffers 4 64 k;
}

Restart php and nginx.

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.