You are not logged in or registered. Please login or register to use the full functionality of this board...


Post Reply 
 
Thread Rating:
  • 2 Votes - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Message: Upstream Timed Out (110: Connection Timed Out)
03-17-2011, 05:38 PM
Post: #1
Question Error Message: Upstream Timed Out (110: Connection Timed Out)
Hello;

I have the current version of your NginxCP installed and for the most part, it is working great. Thank You for your time in creating such a convenient product.

I have one problem that I have not been able to solve. I have a photo gallery that allows uploads of multiple photos, then Mogrify processes them. While Mogrify is processing them and generating tumbnails that should then be displayed to the user, I am presented with a error 504 gateway time out in the browser.

This does not happen if the uploads are small enough that Mogrify can process them in under, I think 60 seconds.

However, when this happens, and I get the 504 error, then php and Mogrify get stuck in some kind of loop, and max out the processor until the php process dies (about 20 minutes later - I have many of the php settings high so I don't have problems with scripts like the upload and processing scripts that take a while to run, thought I probably should lower that.).

I added the proxy_read_timeout 600; and proxy_send_timeout 600; lines and restarted nginx, but I still have the same problem. I understand it could be something anywhere in the stack killing this such as php or mysql, but I am unsure as to where I should be looking. I've gone over the php config a number of times and believe everything there is set more than high enough to allow this to function properly.

I've searched extensively for solutions to this problem, and the only things I seem to come up with are adjusting the above mentioned settings or adjusting php. I've done both and am still faced with the same issue.

Copy of error and Config file are below.

Thank you.

Jamie

This is the Error from the log:
2011/03/17 12:53:17 [error] 4133#0: *2918 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 99.139.201.101, server: pawdogs.com, request: "GET /photopost/bulkupload.php?ppaction=addphotos&do=preview&thecount=10&upuser=jamiedolan&notify=yes&rating=&comments=yes&defcat=1&deftitle=Akiva+and+Vasco+when+Young&defdesc=These+were+taken+4-18-2004+to+5-8-2004.++The+older+dog+is+Akiva%2C+his+birthday+is+3-25-2003.++The+young+puppy+is+Vasco%2C+his+birthday+is+3-15-2004.&defkeywords=akiva+vasco+dog+young&numprocess=50&updir=&dthumbs=yes HTTP/1.1", upstream: "http://173.255.200.107:8081/photopost/bulkupload.php?ppaction=addphotos&do=preview&thecount=10&upuser=jamiedolan&notify=yes&rating=&comments=yes&defcat=1&deftitle=Akiva+and+Vasco+when+Young&defdesc=These+were+taken+4-18-2004+to+5-8-2004.++The+older+dog+is+Akiva%2C+his+birthday+is+3-25-2003.++The+young+puppy+is+Vasco%2C+his+birthday+is+3-15-2004.&defkeywords=akiva+vasco+dog+young&numprocess=50&updir=&dthumbs=yes", host: "www.pawdogs.com"
root@s1 [/var/log/nginx]#

Configuration Editor file:
user nobody;
# no need for more workers in the proxy mode
worker_processes 4;
error_log /var/log/nginx/error.log info;
worker_rlimit_nofile 20480;
events {
worker_connections 5120; # increase for busier servers
use epoll; # you should use epoll here for Linux kernels 2.6.x
}
http {
proxy_read_timeout 600;
proxy_send_timeout 600;
server_name_in_redirect off;
server_names_hash_max_size 2048;
server_names_hash_bucket_size 256;
include mime.types;
default_type application/octet-stream;
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 360;
gzip on;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
gzip_proxied any;
gzip_http_version 1.1;
gzip_min_length 0;
gzip_comp_level 6;
gzip_buffers 16 8k;
# You can remove image/png image/x-icon image/gif image/jpeg if you have slow CPU
gzip_types text/plain text/xml text/css application/x-javascript application/xml image/png image/x-icon image/gif image/jpeg application/xml+rss text/javascript application/atom+xml;
ignore_invalid_headers on;
client_header_timeout 6m;
client_body_timeout 6m;
send_timeout 6m;
reset_timedout_connection on;
connection_pool_size 256;
client_header_buffer_size 256k;
large_client_header_buffers 4 256k;
client_max_body_size 4M;
client_body_buffer_size 128k;
request_pool_size 32k;
output_buffers 4 32k;
postpone_output 1460;
proxy_temp_path /tmp/nginx_proxy/;
client_body_in_file_only on;
log_format bytes_log "$msec $bytes_sent .";
include "/etc/nginx/vhosts/*";
}
Find all posts by this user
Quote this message in a reply
03-22-2011, 10:18 AM
Post: #2
RE: Error Message: Upstream Timed Out (110: Connection Timed Out)
This error shows the httpd is not replied in timely to nginx, optimize your apache settings.
Check httpd timeout and disable apache keepallive and then check again.

Nginx Admin Support
Find all posts by this user
Quote this message in a reply
03-24-2011, 04:50 PM
Post: #3
RE: Error Message: Upstream Timed Out (110: Connection Timed Out)
(03-22-2011 10:18 AM)sysadmin Wrote:  This error shows the httpd is not replied in timely to nginx, optimize your apache settings.
Check httpd timeout and disable apache keepallive and then check again.

Thanks. I did check my time outs in apache and disable keepalive. I finally got it fixed. I had to edit the Nginx proxy.inc file. I set the proxy send, read, and connect to high time outs and now it works perfectly.

Thank You.

Jamie
Find all posts by this user
Quote this message in a reply
03-08-2012, 02:59 PM
Post: #4
RE: Error Message: Upstream Timed Out (110: Connection Timed Out)
I still have same problem, after change proxy.inc time and set keepallive to 0, same error. what can I do?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)