We are getting a "High Load" error on our website very frequently. On analyzing the logs we found the following error.
upstream timed out (110: Connection timed out) while reading response header from upstream.
The server configuration is as follows.
server
{
listen 443;
server_name example.com;
client_max_body_size 20M;
client_body_buffer_size 128k;
ssl on;
ssl_certificate xxxxxxxxx;
ssl_certificate_key xxxxxxxxx;
root /home/xxx/xxx/xxx/public;
passenger_enabled on;
rails_env production;
#passenger_max_request_queue_size 200;
error_log /usr/local/nginx/logs/xxxx.com/error.log;
access_log /usr/local/nginx/logs/xxx.com/access.log;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}
The server has a RAM of 4 GB and only one application is running on this server.
Does anyone know how to fix this?