Author |
|
maxpowers
Joined: 08 Jan 2011 Posts: 3
|
Posted: Sat 08 Jan '11 2:59 Post subject: HTTP Download Stops Unexpectedly |
|
|
I've been wrestling with this problem for several days now. I'm running LAMP server (Apache, CentOS)
Whenever I go to download something large from my website, my download always just stops after 5-7 minutes. This is server wide since every domain I host has this problem. My browser always thinks that the file downloaded successfully. When I try to open it, it is corrupted and is much smaller than the size on the server. File transfer through ftp works perfectly fine.
I've tried editing a lot of different values in php.ini and httpd.conf (always fully restarting Apache) and have not had any results.
This is incredibly frustrating. Someone please help me. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 09 Jan '11 18:20 Post subject: |
|
|
Which Version of Cent OS do you run? Which version of apache? How large are those file? |
|
Back to top |
|
maxpowers
Joined: 08 Jan 2011 Posts: 3
|
Posted: Mon 10 Jan '11 7:39 Post subject: |
|
|
James Blond wrote: | Which Version of Cent OS do you run? Which version of apache? How large are those file? |
CentOS release 5.5 (Final)
Apache 2.2.3
The files are larger than approximately 150 MB. My 4mbps connection cannot finish those in 6 minutes. Anything that takes less than 6 minutes completes fine. I've tried other computers on different connections, even a campus computer, and still have the same problem.
Something I've noticed is that direct downloads from the server do not have this problem. Anything that passes through my site php however does have this problem. It is still all of my domains which are running very different scripts.
Thank you for your help. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 10 Jan '11 11:47 Post subject: |
|
|
I wonder why apache is so old in your distro. However. So you deliver the downloads via php script and not directly from the server?
Did you define a timeout in that scripts? Outputbuffering?
Did you tried catching the error unsing the error logging from php.ini? |
|
Back to top |
|
maxpowers
Joined: 08 Jan 2011 Posts: 3
|
Posted: Mon 10 Jan '11 13:05 Post subject: |
|
|
James Blond wrote: | I wonder why apache is so old in your distro. However. So you deliver the downloads via php script and not directly from the server?
Did you define a timeout in that scripts? Outputbuffering?
Did you tried catching the error unsing the error logging from php.ini? |
After a lot of time I think I've found the problem. Apache cause fast cgi to timeout since it doesn't output anything during the download. I've changed my server from fast cgi to ordinary cgi and downloads are working.
I'm gonna need help fixing the fast cgi problem since fast cgi is many times less resource intensive than ordinary cgi
How or where do I put in the FastCgiConfig directive -idle-timeout 10800 as described at: http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html
Does it go in httpd.conf? I'm not even sure if I should FastCgiConfig or FastCgiServer or what.
In your response could include an exact example of what I should add to where?
Also, could I easily update Apache to the latest stable version? |
|
Back to top |
|