Welcome! Log In Create A New Profile

Advanced

Re: Randomly stopping large file downloads?

All files from this thread

File Name File Size   Posted by Date  
login.png 3.6 KB open | download Jim Ohlstein 05/19/2011 Read message
May 20, 2011 03:43PM
Hi Maxim, thanks for your help.
I'm not using a proxy, it's just a straight connection to nginx.

I ran it again with error log on info and found that it thinks the client is timing out, although watching firefox it seemed to be downloading ok the entire time and I wasn't having connectivity issues on other sites.

I tried keepalive_timeout 65; rather than 5 but had the same problem.

Here's the info below, any ideas what it could be?

----

/var/log/nginx# tail cosmic-access.log
76.250.143.130 - - [20/May/2011:19:32:50 +0000] "GET /bigfile.sql.gz HTTP/1.1" 200 114499284 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17"

/var/log/nginx# tail cosmic-error.log
2011/05/20 19:32:50 [info] 12222#0: *10 client timed out (110: Connection timed out) while sending response to client, client: 76.250.143.130, server: cosmicchannelings.com, request: "GET /bigfile.sql.gz HTTP/1.1", host: "cosmicchannelings.com:81"


root@217948:/var/log/nginx# nginx -V
nginx version: nginx/0.7.65
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair


---------
/etc/nginx/nginx.conf:
---------

user www-data;
#worker_processes 1;
worker_processes 2;

pid /var/run/nginx.pid;

events {
worker_connections 1024;
# multi_accept on;
}

http {
include /etc/nginx/mime.types;

error_log /var/log/nginx/error.log info;
access_log /var/log/nginx/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
#keepalive_timeout 65;
keepalive_timeout 5;
tcp_nodelay on;

# gzip on;
# gzip_disable "MSIE [1-6]\.(?!.*SV1)";

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

# mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
# }


---------------
/etc/nginx/sites-enabled/sites-enabled/cosmic:
---------------


# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts

server {
listen 81;
server_name cosmicchannelings.com www.cosmicchannelings.com;

# access_log /var/log/apache2/cosmic-access.log;
# error_log /var/log/apache2/cosmic-error.log;
access_log /var/log/nginx/cosmic-access.log;
error_log /var/log/nginx/cosmic-error.log info;

root /var/www/cosmic;
index index.php index.html index.htm;

# wordpress url writing
error_page 404 /blog/index.php;

if ($http_user_agent ~ "magpie-crawler" ) { return 403; }

# prevents nginx from returning 404s all the time along with good content
try_files $uri $uri/ /blog/index.php;

# also works, may be slower?
# if (!-e $request_filename) {
# rewrite ^/blog/(.+)$ /blog/index.php?q=$1 last;
# }

# cave yahoo group
# "^/i/([a-z0-9_\-]+)/([a-z0-9_\-]+)/([a-z0-9_\-]+)?$" => "/cave/link.php?m=$1&g=$2&s=$3",
rewrite ^/i/([a-z0-9_\-]+)/([a-z0-9_\-]+)/([a-z0-9_\-]+)?$ /cave/link.php?m=$1&g=$2&s=$3 permanent;

# convert old blog url format to new. old had post id, new only has slug
# "^(/blog/[a-z0-9_\-]+)/[0-9]+$" => "$1",
rewrite ^(/blog/[a-z0-9_\-]+)/[0-9]+$ $1 permanent;

# fix broken link errors. /blog/k_karma_29/family.html => /blog/k_family
# "^/blog/k_[a-z0-9_\-]+/([a-z0-9_\-]+)\.html+$" => "/blog/k_$1",
rewrite ^/blog/k_[a-z0-9_\-]+/([a-z0-9_\-]+)\.html+$ /blog/k_$1 permanent;

# /blog/tag/new-world-order/topic.html
# "^/blog/tag/[a-z0-9_\-]+/([a-z0-9_\-]+)\.html+$" => "/blog/k_$1",
rewrite ^/blog/tag/[a-z0-9_\-]+/([a-z0-9_\-]+)\.html+$ /blog/k_$1 permanent;

# redirect old archive html pages to blog pages
# "^/archive/topic/([a-z0-9_\-]+)\.html+$" => "/blog/k_$1",
rewrite ^/archive/topic/([a-z0-9_\-]+)\.html+$ /blog/k_$1 permanent;

# fix bug where topic lines in keyword pages got linked as http://www.cosmicchannelings.com/blog/heaven.html
# "^/blog/([a-z0-9_\-]+)\.html+$" => "/blog/k_$1"
rewrite ^/blog/([a-z0-9_\-]+)\.html+$ /blog/k_$1 permanent;


# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass backend;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /var/www/cosmic$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;

#fastcgi_buffer_size 128k;
#fastcgi_buffers 4 256k;

# from http://forum.nginx.org/read.php?3,70566
fastcgi_buffers 256 16k;
fastcgi_buffer_size 32k;

fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}

upstream backend {
server 127.0.0.1:9000;
}
Subject Author Posted

Randomly stopping large file downloads?

nickn May 19, 2011 04:34PM

Re: Randomly stopping large file downloads? Attachments

Jim Ohlstein May 19, 2011 05:02PM

Re: Randomly stopping large file downloads?

nickn May 19, 2011 05:29PM

Re: Randomly stopping large file downloads?

Maxim Dounin May 20, 2011 06:22AM

Re: Randomly stopping large file downloads?

nickn May 20, 2011 03:43PM

Re: Randomly stopping large file downloads?

Maxim Dounin May 21, 2011 04:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready