I have been getting this error and cannot figure out why. Here is the exact error:
2016/06/13 19:49:55 [error] 1623#0: *977708 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: websitename.net, request: "GET /wp-login.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "websitename.net", referrer: "https://websitename.net/wp-login.php"
I didn’t make any changes to break it. It started after I saw this event in the log file:
2016/06/09 21:00:00 [emerg] 14982#0: "if" directive is not allowed here in /etc/nginx/nginx.conf:6
I have tried this, this, and this but none of it has made a difference. Here is my config file.
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!
These two errors may or may not be related.
For the timeout error, as referenced in this article try adding the line:
fastcgi_read_timeout 120;
to the nginx configuration block with the rest of your fastcgi params. (the block probably starts with location ~* .php$ {...
For the nginx.conf error, it sounds like you have some kind of nginx configuration error. What is the code on line 6? Are you using an if statement outside of a location {} block in the configuration?
Here an aritcle that I wrote recently that addresses this problem as well Nginx upstream timed out (why and how to fix)
As for you if error, that could prevent Nginx from reloading config, maybe because of it you couldn’t see the results of fastcgi_read_timeout.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.