If you’re seeing this post, most likely you have been googling some combination of items that reflect that you’re seeing a 60 second connection reset when downloading files directly from apache. Say, via wget:

33% [================================> ] 54,299,699 932KB/s in 61s

2014-02-09 11:08:14 (874 KB/s) - Connection closed at byte 54299699. Retrying.

Hopefully I can save you some time here. Are you running varnish in front of apache? If so, your answer is a default value for varnish’s “send_timeout” of 60 seconds. To correct it:

Modify your /etc/default/varnish in Ubuntu or /etc/sysconfig/varnish for Redhat flavors. Change it from

DAEMON_OPTS="-a :80 \
-f /etc/varnish/default.vcl \
-T 127.0.0.1:6082 \
-u varnish -g varnish \
-t 120 \
-w 5,500,300 \
-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G \
-S /etc/varnish/secret \
-n $INSTANCE"

to this: (Notice the added -p line)

DAEMON_OPTS="-a :80 \
-f /etc/varnish/default.vcl \
-T 127.0.0.1:6082 \
-u varnish -g varnish \
-t 120 \
-w 5,500,300 \
-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G \
-S /etc/varnish/secret \
-p send_timeout=900 \
-n $INSTANCE"

900 = 15 minutes. You should be able to tell right away if this was the solution to your problem and adjust the variable to the one you want to keep long term.

Please note: The above blocks of text are just examples from one of my boxes. You may have other values in there. Ultimately, the above is just provided to show you that you’re sticking one more line in the middle there. Don’t just cut and paste my entire block of text into your file, you could potentially overwrite other changes you’ve made. You’re just looking to insert that -p line with the send_timeout value.


Category: varnish

Leave a Reply

Categories


gives good tech

tech.superhappykittymeow.com
Kale is one of the smartest people I know

Racker Hacker
Major is always good for leet deetz