if I have large file downloads served with apache server, is there a way to restart/reload the http server(eg. with new httpd.conf update) without interrupting ongoing file downloads? or at least provide a way for clients to resume downloads?
Httpd – restarting apache http server without interrupting http downloads
apache-2.2httpd
Related Topic
- Finding out what user Apache is running as
- Ubuntu – How to change the document root of a Linux Apache server
- Php – How to protect large file downloads through PHP and/or Apache
- Tomcat – Answering all requests with a maintenance page without restarting Apache HTTP server
- Redirect, Change URLs or Redirect HTTP to HTTPS in Apache – Everything You Ever Wanted to Know About mod_rewrite Rules but Were Afraid to Ask
- Restarting or stopping apache results in waiting forever
- Httpd – Unable to change Apache http server port in unix
Best Answer
A normal download happens in a single tcp connection, there is no 'generic' way to restart apache and maintain that single connection.
BUT if you run
or if you send a
USR1
signal to your apache master process, then it will reload gracefully, this means that it will complete serving the requests currently in progress and then reload.On the http protocol level it is possible to request just part of a file.
The client can send a
HEAD
request for the given file to the server. If the server responds withAccept-Ranges: bytes
and aContent-Length
header, the client can then proceed to send aGET
request using aRange: bytes=...
header to receive whichever part of the file it wants. The server will respond with partial content of the file and put a 206 status on its response.Internet Explorer and Firefox are known to do this for normal downloads when you ask the browser to resume a download.