Appearance
FastCGI process exceeded configured activity timeout
FastCGI is a protocol for interfacing interactive programs with a web server. The "activity timeout" refers to the amount of time that the web server will wait for a response from the FastCGI process before considering it to be unresponsive and terminating it.
If the FastCGI process takes longer than the configured timeout to respond, the web server will generate an error message like "FastCGI process exceeded configured activity timeout" and terminate the process.
For example, if the activity timeout is set to 30 seconds, and a FastCGI process takes longer than 30 seconds to respond to a request, the web server will terminate the process and return an error message to the client.
This error message can occur for a number of reasons, such as the FastCGI process being stuck in an infinite loop, a slow or overloaded database, or a heavy computation.
To fix this issue, prioritize optimizing the root cause over simply increasing timeouts. You can optimize your script's code, ensure dependencies are up to date, or optimize database queries. If you still need to adjust the timeout, update your web server and PHP-FPM configurations. For example, in Nginx, increase the fastcgi_read_timeout directive:
nginx
location ~ \.php$ {
fastcgi_read_timeout 60s;
# ... other directives
}In PHP-FPM, adjust the request_terminate_timeout in your pool configuration (e.g., www.conf):
ini
request_terminate_timeout = 60After changing PHP-FPM settings, restart the service (sudo systemctl restart php-fpm or php8.2-fpm).