{"id":793,"date":"2012-11-07T23:16:48","date_gmt":"2012-11-07T15:16:48","guid":{"rendered":"http:\/\/binaryone.com.au\/?p=793"},"modified":"2023-11-23T08:44:27","modified_gmt":"2023-11-23T08:44:27","slug":"how-to-fix-mod_fcgid-http-request-length-131619-so-far-exceeds-maxrequestlen-131072-error-on-ubuntu-12-04-lts-precise-pangolin-linux","status":"publish","type":"post","link":"https:\/\/binaryone.com.au\/23\/how-to-fix-mod_fcgid-http-request-length-131619-so-far-exceeds-maxrequestlen-131072-error-on-ubuntu-12-04-lts-precise-pangolin-linux\/","title":{"rendered":"How to Fix \u201cmod_fcgid: HTTP request length 131619 (so far) exceeds MaxRequestLen (131072)\u201d error on Ubuntu 12.04 LTS (Precise Pangolin) Linux."},"content":{"rendered":"\n<p>If you are trying to upload a file through WordPress or another content system to your web site and your website is running on Apache2\/PHP5\/mod_fcgid, and your browser displays the error:<\/p>\n\n\n<div class=\"wp-block-ub-content-toggle wp-block-ub-content-toggle-block\" id=\"ub-content-toggle-block-c5bc720c-06a7-4b45-868e-a4617c1561f8\" data-mobilecollapse=\"false\" data-desktopcollapse=\"false\" data-preventcollapse=\"false\" data-showonlyone=\"false\">\n<div class=\"wp-block-ub-content-toggle-accordion\" style=\"border-color: #19294e; \" id=\"ub-content-toggle-panel-block-\">\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-title-wrap\" style=\"background-color: #19294e;\" aria-controls=\"ub-content-toggle-panel-0-c5bc720c-06a7-4b45-868e-a4617c1561f8\" tabindex=\"0\">\n\t\t\t<p class=\"wp-block-ub-content-toggle-accordion-title ub-content-toggle-title-c5bc720c-06a7-4b45-868e-a4617c1561f8\" style=\"color: #f2f2f2; \">Browser error<\/p>\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-toggle-wrap right\" style=\"color: #f2f2f2;\"><span class=\"wp-block-ub-content-toggle-accordion-state-indicator wp-block-ub-chevron-down open\"><\/span><\/div>\n\t\t<\/div>\n\t\t\t<div role=\"region\" aria-expanded=\"true\" class=\"wp-block-ub-content-toggle-accordion-content-wrap\" id=\"ub-content-toggle-panel-0-c5bc720c-06a7-4b45-868e-a4617c1561f8\">\n\n<p>Internal server error<\/p>\n\n<\/div>\n\t\t<\/div>\n<\/div>\n\n\n<p>and in your Apaches error log you see something like<\/p>\n\n\n<div class=\"wp-block-ub-content-toggle wp-block-ub-content-toggle-block\" id=\"ub-content-toggle-block-cdce5994-9429-4180-89dc-e450fd4a0919\" data-mobilecollapse=\"false\" data-desktopcollapse=\"false\" data-preventcollapse=\"false\" data-showonlyone=\"false\">\n<div class=\"wp-block-ub-content-toggle-accordion\" style=\"border-color: #19294e; \" id=\"ub-content-toggle-panel-block-\">\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-title-wrap\" style=\"background-color: #19294e;\" aria-controls=\"ub-content-toggle-panel-0-cdce5994-9429-4180-89dc-e450fd4a0919\" tabindex=\"0\">\n\t\t\t<p class=\"wp-block-ub-content-toggle-accordion-title ub-content-toggle-title-cdce5994-9429-4180-89dc-e450fd4a0919\" style=\"color: #f2f2f2; \">Apaches error log<\/p>\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-toggle-wrap right\" style=\"color: #f2f2f2;\"><span class=\"wp-block-ub-content-toggle-accordion-state-indicator wp-block-ub-chevron-down open\"><\/span><\/div>\n\t\t<\/div>\n\t\t\t<div role=\"region\" aria-expanded=\"true\" class=\"wp-block-ub-content-toggle-accordion-content-wrap\" id=\"ub-content-toggle-panel-0-cdce5994-9429-4180-89dc-e450fd4a0919\">\n\n<p>[Wed Nov 07 13:12:45 2012] [warn] [client 192.168.XXX.XXX] mod_fcgid: HTTP request length 131619 (so far) exceeds MaxRequestLen (131072), referer: \u2026<\/p>\n\n<\/div>\n\t\t<\/div>\n<\/div>\n\n\n<p>This error is because the default value of FcgidMaxRequestLen is 131072 which is very small see <a title=\"Apache Module mod_fcgid for more information\" href=\"http:\/\/httpd.apache.org\/mod_fcgid\/mod\/mod_fcgid.html#fcgidmaxrequestlen\" target=\"_blank\" rel=\"nofollow noopener\">Apache Module mod_fcgid for more information<\/a>.<\/p>\n\n\n\n<p>First check in your php.ini that upload_max_filesize has a big enough value for your upload. The default in php.ini is upload_max_filesize = 2M which stands for 2 megabytes (MB). If it is not set, set it to<\/p>\n\n\n\n<p>Next edit your file \/etc\/apache2\/mods-available\/fcgid.conf, or if you have Virtualmin installed go to Webmin&gt; Servers&gt; Apache Webserver&gt; and select the Global configuration tab then click Edit Config Files. Now select \/etc\/apache2\/mods-available\/fcgid.conf in the dropdown list then click the Edit Directives in File button. Either way you should see something like this.<\/p>\n\n\n<div class=\"wp-block-ub-content-toggle wp-block-ub-content-toggle-block\" id=\"ub-content-toggle-block-f0b3c63a-d46a-4614-a7ce-d0d3f3dd9390\" data-mobilecollapse=\"false\" data-desktopcollapse=\"false\" data-preventcollapse=\"false\" data-showonlyone=\"false\">\n<div class=\"wp-block-ub-content-toggle-accordion\" style=\"border-color: #19294e; \" id=\"ub-content-toggle-panel-block-\">\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-title-wrap\" style=\"background-color: #19294e;\" aria-controls=\"ub-content-toggle-panel-0-f0b3c63a-d46a-4614-a7ce-d0d3f3dd9390\" tabindex=\"0\">\n\t\t\t<p class=\"wp-block-ub-content-toggle-accordion-title ub-content-toggle-title-f0b3c63a-d46a-4614-a7ce-d0d3f3dd9390\" style=\"color: #f2f2f2; \">Current directives<\/p>\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-toggle-wrap right\" style=\"color: #f2f2f2;\"><span class=\"wp-block-ub-content-toggle-accordion-state-indicator wp-block-ub-chevron-down open\"><\/span><\/div>\n\t\t<\/div>\n\t\t\t<div role=\"region\" aria-expanded=\"true\" class=\"wp-block-ub-content-toggle-accordion-content-wrap\" id=\"ub-content-toggle-panel-0-f0b3c63a-d46a-4614-a7ce-d0d3f3dd9390\">\n\n<p>&lt;IfModule mod_fcgid.c&gt;<br>AddHandler\u00a0\u00a0 \u00a0fcgid-script .fcgi<br>FcgidConnectTimeout 20<br>&lt;\/IfModule&gt;<\/p>\n\n<\/div>\n\t\t<\/div>\n<\/div>\n\n\n<p>You now want to add the FcgidMaxRequestLen 2097152 directive to make the file look like this. NOTE: FcgidMaxRequestLen 2097152 = 2MB.<\/p>\n\n\n<div class=\"wp-block-ub-content-toggle wp-block-ub-content-toggle-block\" id=\"ub-content-toggle-block-12bc822a-601f-463b-95b5-1b84407a22a5\" data-mobilecollapse=\"false\" data-desktopcollapse=\"false\" data-preventcollapse=\"false\" data-showonlyone=\"false\">\n<div class=\"wp-block-ub-content-toggle-accordion\" style=\"border-color: #19294e; \" id=\"ub-content-toggle-panel-block-\">\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-title-wrap\" style=\"background-color: #19294e;\" aria-controls=\"ub-content-toggle-panel-0-12bc822a-601f-463b-95b5-1b84407a22a5\" tabindex=\"0\">\n\t\t\t<p class=\"wp-block-ub-content-toggle-accordion-title ub-content-toggle-title-12bc822a-601f-463b-95b5-1b84407a22a5\" style=\"color: #f2f2f2; \">Edit directive<\/p>\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-toggle-wrap right\" style=\"color: #f2f2f2;\"><span class=\"wp-block-ub-content-toggle-accordion-state-indicator wp-block-ub-chevron-down open\"><\/span><\/div>\n\t\t<\/div>\n\t\t\t<div role=\"region\" aria-expanded=\"true\" class=\"wp-block-ub-content-toggle-accordion-content-wrap\" id=\"ub-content-toggle-panel-0-12bc822a-601f-463b-95b5-1b84407a22a5\">\n\n<p>&lt;IfModule mod_fcgid.c&gt;<br>AddHandler\u00a0\u00a0 \u00a0fcgid-script .fcgi<br>FcgidConnectTimeout 20<br>FcgidMaxRequestLen 2097152<br>&lt;\/IfModule&gt;<\/p>\n\n<\/div>\n\t\t<\/div>\n<\/div>\n\n\n<p>Now save the changes and restart Apache with<\/p>\n\n\n<div class=\"wp-block-ub-content-toggle wp-block-ub-content-toggle-block\" id=\"ub-content-toggle-block-60a3d863-90cb-4455-87d6-8640151703a1\" data-mobilecollapse=\"false\" data-desktopcollapse=\"false\" data-preventcollapse=\"false\" data-showonlyone=\"false\">\n<div class=\"wp-block-ub-content-toggle-accordion\" style=\"border-color: #19294e; \" id=\"ub-content-toggle-panel-block-\">\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-title-wrap\" style=\"background-color: #19294e;\" aria-controls=\"ub-content-toggle-panel-0-60a3d863-90cb-4455-87d6-8640151703a1\" tabindex=\"0\">\n\t\t\t<p class=\"wp-block-ub-content-toggle-accordion-title ub-content-toggle-title-60a3d863-90cb-4455-87d6-8640151703a1\" style=\"color: #f2f2f2; \">Restart Apache<\/p>\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-toggle-wrap right\" style=\"color: #f2f2f2;\"><span class=\"wp-block-ub-content-toggle-accordion-state-indicator wp-block-ub-chevron-down open\"><\/span><\/div>\n\t\t<\/div>\n\t\t\t<div role=\"region\" aria-expanded=\"true\" class=\"wp-block-ub-content-toggle-accordion-content-wrap\" id=\"ub-content-toggle-panel-0-60a3d863-90cb-4455-87d6-8640151703a1\">\n\n<p>\/etc\/init.d\/apache2 restart<\/p>\n\n<\/div>\n\t\t<\/div>\n<\/div>\n\n\n<p>Or if working in Virtualmin there is a Stop Apache link in the top right hand corner of your screen click it and when Apache has stoped the link will change to a Start Apache link. Click it also. And that is it you will now be able to upload your 2MB files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are trying to upload a file through WordPress or another content system to your web site and your website is running on Apache2\/PHP5\/mod_fcgid, and your browser displays the error: and in your Apaches error log you see something like This error is because the default value of FcgidMaxRequestLen is 131072 which is very [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[44],"tags":[43,45,46,47,48,49,50,19,20],"class_list":["post-793","post","type-post","status-publish","format-standard","hentry","category-how-to","tag-apache2","tag-http-request-length-so-far-exceeds-maxrequestlen131072","tag-internal-server-error","tag-linux","tag-mod_fcgid","tag-php5","tag-ubuntu-12-04-lts-precise-pangolin","tag-virtualmin","tag-webmin"],"aioseo_notices":[],"featured_image_src":null,"author_info":{"display_name":"Allan","author_link":"https:\/\/binaryone.com.au\/23\/author\/allan-cheesman-binaryone\/"},"_links":{"self":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":3,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts\/793\/revisions"}],"predecessor-version":[{"id":2466,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts\/793\/revisions\/2466"}],"wp:attachment":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/media?parent=793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/categories?post=793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/tags?post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}