Apache2 mod_fcgid maxrequestlen

Apache2 – mod_fcgid: HTTP request length exceeds MaxRequestLen

Few days ago I found a very good Open Source project for sharing and synchronization (Dropbox alternative) called Pydio. Heard before for this project, but I have never tried to install it before. I tried the demo and decided to install Pydio on my own server and check this little bit more. Installation procedure went smoothly and in 5 minutes I had my sharing web site ready to use.

But, when I tried to upload multiple files, all of them larger than 3Mb, browser simply returned:

Then I checked Apache2 log, and here is what I found:

It seams that MaxRequestLen directive of mod_fccgid is too low. To fix this, you need to update few options in your php.ini file. Search for upload_max_filesize which puts limit on any single file, default value should be set to this:

change this value to whatever you want, but I strongly suggest you to set >50M. Then search for post_max_size, default value is:

this is the size of the entire body of the request, which could include multiple files. Set this value at lest 2-3x as upload_max_filesize.

Now, to avoid “HTTP request length exceeds MaxRequestLen” you need to update FcgidMaxRequestLen directive. Default value is set to:

which is, as you can guess, very very small. To change this, update your virtual host configuration file and add FcgidMaxRequestLen directive value based on your application requirement, for example:

that is equal to roughly 200 MB.Finally restart Apache:

 

[GARD]

 

Follow me

Mirza Pasic

Full Stack Developer at OLX
Web Developer. Geek. Systematic. Dreamer
Follow me

Published by

Mirza Pasic

Web Developer. Geek. Systematic. Dreamer