Question

Failed to read FastCGI header on a simple non-WP app

Hi i just deployed a 1-click PHP app, (webonyx/grqphql) from gitlabs, it compiles and deploys fine but when i try to hit the app from my browser i’m getting crashes with ‘Failed to read FastCGI header’ without a clue as to what is causing the crash - i’ve tried increasing the PHP memory limit to 256, but have run out of other ideas… the PHP app of course runs fine locally…

the console log is this:

[progressive-notes] [2024-02-17 17:54:36] Detected 512MiB of RAM
[progressive-notes] [2024-02-17 17:54:36] PHP memory_limit is 256M Bytes
[progressive-notes] [2024-02-17 17:54:36] Starting php-fpm with 2 workers...
[progressive-notes] [2024-02-17 17:54:37] Starting httpd...
[progressive-notes] [2024-02-17 17:54:38] Application ready for connections on port 8080.
[progressive-notes] [2024-02-17 17:54:49] 10.244.46.155 - - 17/Feb/2024:17:54:49 +0000] "GET /test.php HTTP/1.1" 200 95662 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
[progressive-notes] [2024-02-17 17:55:37] 10.244.8.122 - - [17/Feb/2024:17:55:37 +0000] "-" 408 - "-" "-
[progressive-notes] [2024-02-17 17:55:47] 10.244.8.122 - - [17/Feb/2024:17:55:47 +0000] "-" 408 - "-" "-
[progressive-notes] [2024-02-17 17:57:47] 10.244.8.122 - - [17/Feb/2024:17:57:47 +0000] "-" 408 - "-" "-
[progressive-notes] [2024-02-17 17:57:57] [17-Feb-2024 17:57:57] WARNING: [pool www] child 169, script '/workspace/index.php' (request: "POST /index.php") execution timed out (34.130184 sec), terminating
[progressive-notes] [2024-02-17 17:57:57] [17-Feb-2024 17:57:57] WARNING: [pool www] child 169 exited on signal 15 (SIGTERM) after 200.026348 seconds from start
[progressive-notes] [2024-02-17 17:57:57] [Sat Feb 17 17:57:57.570812 2024] [proxy_fcgi:error] [pid 178:tid 139470863074880] [client 10.244.46.155:53844] AH01067: Failed to read FastCGI header
[progressive-notes] [2024-02-17 17:57:57] [Sat Feb 17 17:57:57.571408 2024] [proxy_fcgi:error] [pid 178:tid 139470863074880] (104)Connection reset by peer: [client 10.244.46.155:53844] AH01075: Error dispatching request to :
[progressive-notes] [2024-02-17 17:57:57] 10.244.46.155 - - [17/Feb/2024:17:57:23 +0000] "POST / HTTP/1.1" 503 299 "-" "insomnia/2023.5.8
[progressive-notes] [2024-02-17 17:57:57] 10.244.8.122 - - [17/Feb/2024:17:57:57 +0000] "-" 408 - "-" "-
[progressive-notes] [2024-02-17 17:58:07] 10.244.8.122 - - [17/Feb/2024:17:58:07 +0000] "-" 408 - "-" "-
[progressive-notes] [2024-02-17 17:58:27] 10.244.8.122 - - [17/Feb/2024:17:58:27 +0000] "-" 408 - "-" "-

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
February 18, 2024
Accepted Answer

Heya @samwangler,

The errors I see from the log are

[progressive-notes] [2024-02-17 17:57:57] [Sat Feb 17 17:57:57.570812 2024] [proxy_fcgi:error] [pid 178:tid 139470863074880] [client 10.244.46.155:53844] AH01067: Failed to read FastCGI header
[progressive-notes] [2024-02-17 17:57:57] [Sat Feb 17 17:57:57.571408 2024] [proxy_fcgi:error] [pid 178:tid 139470863074880] (104)Connection reset by peer: [client 10.244.46.155:53844] AH01075: Error dispatching request to :
[progressive-notes] [2024-02-17 17:57:57] 10.244.46.155 - - [17/Feb/2024:17:57:23 +0000] "POST / HTTP/1.1" 503 299 "-" "insomnia/2023.5.8

This usually would mean a problem with the application you are hosting however can you post your configuration file just for us to be sure?

alexdo
Site Moderator
Site Moderator badge
February 18, 2024

Heya, @samwangler

You can double-check if the PHP-FPM settings are not set to a low value, this will be for the max_execution_time and request_terminate_timeout

Another approach will be to use PHP Debugging tools like tools like Xdebug to identify performance bottlenecks. This can help pinpoint specific areas of your code that are causing delays.

Hope that this helps!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel