Submitted by rogeriobrito on Tue, 08/15/2017 - 15:59
Hello,
Apache 2.4.6 has a bug that it ignores the timeout setting in httpd.conf. I'm trying to setup upload for big files and I can't do it because the time setting is ignored.
Please see https://bugs.centos.org/view.php?id=11400&nbn=1 and update Apache on Virtualmin Repository to fix the problem.
Thank you Rogerio
Status:
Active
Comments
Submitted by JamieCameron on Tue, 08/15/2017 - 17:33 Comment #1
Generally, the only Apache versions that we support in Virtualmin are those provided by your Linux distribution. Upgrading to a version from a different source is unlikely to work reliably..
Submitted by rogeriobrito on Wed, 08/16/2017 - 08:39 Comment #2
Hi Jamie,
You are saying that Apache should be installed using the CentOS repository? I always install Virtualmin in a fresh minimal install of CentOS. And Apache is automatically installed using Virtualmin Repository, not the CentOS one.
[root@linux08 ~]# yum list installed httpd*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.xpg.com.br
* extras: centos.xpg.com.br
* updates: centos.xpg.com.br
Installed Packages
httpd.x86_64 1:2.4.6-45.el7.centos.4vm @virtualmin
httpd-tools.x86_64 1:2.4.6-45.el7.centos.4vm @virtualmin
Am I doing anything wrong?
Thanks
Submitted by andreychek on Wed, 08/16/2017 - 09:16 Comment #3
Sorry, I think Jamie misunderstood what you were asking there.
However, it looks like httpd 2.4.6-45 (which is what it appears you have there) is the latest version shipped by CentOS... our httpd package is based on that one:
http://mirror.centos.org/centos/7/updates/x86_64/Packages/
As soon as they provide a new version, we'll certainly push a build out based on that.
Submitted by rogeriobrito on Wed, 08/16/2017 - 10:58 Comment #4
Hi Erik, thanks.
How can I make sure I have the correct Apache version? I ask this because no matter what I do I can't change the Apache timeout. It always gives me a 408 error on 30 seconds of file upload.
I've tried editing the virtual server I need, does not work.
Timeout 600
RequestReadTimeout header=10 body=600
Also tried the Apache global configuration on Webmin->Apache->Global Configuration->Networking and Addresses, changing the Request Timeout and Keep Alive timeout, and it does not work.
And then I found out about the bug, that matches the Apache Version Virtualmin shows... what can I do?
Thanks
Rogerio
Submitted by andreychek on Wed, 08/16/2017 - 11:19 Comment #5
I originally thought that maybe CentOS hadn't provided an update including that bugfix yet, but as I re-read the bug report, it looks like it has been corrected as of earlier this year.
The Apache version in our repo is based on the most recent one provided by CentOS (the only difference is the suexec location, which points to /home rather than /var/www).
The version you mentioned above is indeed the most recent.
I will have Joe double-check that we are indeed using the most recent Apache version available through CentOS, and I'll also have him verify that there isn't anything we're doing that would prevent that particular bug from being solved.
If we're using the most recent Apache version, there may not be much else we can do, though we'll certainly double-check all that.
Submitted by rogeriobrito on Wed, 08/16/2017 - 11:50 Comment #6
Great Erik,
Thank you
Submitted by cruiskeen on Wed, 08/16/2017 - 20:52 Comment #7
That error is in the fcgid_proxy timeout which is not what we're talking about here - plus this was fixed years ago in 2.4.6-40 so -- this is not the same issue. It was backported into RedHat and CentOS back somewhere in the 7.1 os release
If you are getting a timeout on 30 seconds of file upload I have to ask - are you running PHP? It's probably your PHP configuration in that case, not Apache.
Submitted by rogeriobrito on Wed, 08/16/2017 - 21:51 Comment #8
Hello cruiskeen,
Yes, I'm running PHP, configured as bellow:
Maximum memory allocation = 256M
Maximum HTTP POST size = 1Gb
Maximum file upload size = 1Gb
Maximum execution time = 600
Maximum input parsing time = 600
Also, when PHP times out it does not return error code 408, does it?
Thanks,
When using mod_fcgid or php-fpm there is a different php.ini per virtual host. So you need to adjust your PHP timeouts in the php.ini for the virtual server in question (in /home/domain/etc/php.ini).
There's also a timeout in the Apache configuration when using mod_fcgid, called IPCCommTimeout. That's set in the httpd.conf.
Submitted by rogeriobrito on Tue, 09/12/2017 - 11:25 Comment #10
Sorry guys, it was a mod_security rule that was blocking the upload.
No problem with Apache. You can close the issue.
Thank you
Submitted by andreychek on Tue, 09/12/2017 - 11:40 Comment #11
We're glad to hear it's working, thanks for letting us know what the issue was!