This morning I noticed that my site was running extremely slow. Logging into the server, I noticed that the cpu and ram were barely being touched. I’m on a 8gb box from Media Temple.
Tailing my error logs, I see this:
upstream timed out (110: Connection timed out) while reading response header from upstream everywhere. Restarting the server fixes it for about 10 minutes, then the site starts to timeout again.
I’ve not changed anything on the server after provisioning it.
PHP and Nginx have fairly low default settings for request sizes and memory usage - for example, I created a form which allowed visitors to upload a 5mb file - I had to adjust settings in both PHP and Nginx to facilitate this.
I’m not entirely sure what default settings Trellis enables but if there’s anything at all on your pages, or any installed plugins which would increase memory usage or request size, I’d start there.
Also, check your access logs - I had a plugin issue once where search engine crawling requests skyrocketed due to a plugin script being poorly configured.
Update: maybe list your plugins here, so anyone with any experience of them can recommend possible troubleshooting steps…
After having some troubles with the same errors I edited nginx.conf the same way and it seems to solve it so far. However as I changed it directly in the vagrant box it will be overwritten one day when preprovisioning the machine.
So I wonder where I could set it as default in the trellis config files. In the ansible file I find {{ nginx_fastcgi_buffers }}and wonder whether I could set it e.g. in group_vars/develpment/main.yml