Page 1 of 1

Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Tue Jun 01, 2021 9:58 pm
by kleung
Hi,

I am working on a Dynaform which consists of a number of subforms. I added the tested subforms one-by-one into the Dynaform. The Dynaform worked properly with 6 subforms being added. Then I added the seventh subform. The Dynaform could still display properly during preview, include the javascript operation of the dynaform. But when I clicked any submit button in the page (including those worked properly previously), the page only with the message
"Request-URI Too Long
The requested URL's length exceeds the capacity limit for this server." showed up.

The Dynaform worked properly again having the seventh subform being removed. (The seventh subform had been well tested before it was added to the main Dynaform. All the fields in the Dynaform, including the seventh subform were unique.)

I think my Dynaform has exceeded the limits of some parameters in the PM and/or server configurations.
Grateful if I can be advised which parameters should I change so as to extend the limits.

Thousand Thanks in advance.

cheers,
Karl
ps I am working with PM 3.2.1 community version

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Thu Jun 03, 2021 12:32 am
by kirkwg
Hello Karl,

I haven't encountered this issue. But definitely related to your number of sub-forms to be used which affect the HTTP request when you are submitting the form. I would try use less sub-forms as possible.

Another way is try to modify the httpd.conf under apache conf folder.
Say under <Virtual Host> add 2 directives there: add more size, e.g. 10000, or 15000, etc.
Doc Ref: https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestline

LimitRequestLine 10000 //default 8190
LimitRequestFieldSize 10000 //default 8190

You need to restart the Apache to make it new config effective, trial and error, good luck?

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Sun Jun 06, 2021 8:03 am
by kleung
Hi Kirk,

I added the following two lines to httpd.conf
LimitRequestLine 81900
LimitRequestFieldSize 81900,
ie extend the limit to 10 times that of default values.

In addition to httpd.conf, I have also changed the limits in php.ini to
max_input_vars = 128000
memory_limit = 131072 M

However, the efforts are in vain. The problem still occur.
Any clue?

Thousand Thanks
cheers
Karl

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Sun Jun 06, 2021 9:52 pm
by kirkwg
Sorry, no clue at this moment. Better try use less of sub forms first, cheers.

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Sun Jun 06, 2021 9:57 pm
by kleung
Hi Kirk,

Thank you for your effort, anyway.

cheers,
Karl

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Mon Jun 07, 2021 2:28 am
by programerboy
Hi,
Please set max_input_vars=10000 in your php.ini or you use bitnami set php_value max_input_vars 10000 in httpd-app.conf file.

https://pmlearning.info
Thanks

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Mon Jun 07, 2021 5:18 am
by kleung
Hi programerboy,

Thank you for your advice.
I followed your instructions to revise the php.ini and httpd-app.conf files. However the problem persist.

Any clue?

cheers,
karl

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Mon Jun 07, 2021 5:57 am
by programerboy
Can you export and send from your process? You should not receive such an error, because the data is sent by POST and there is no difference in the number of variables in the form in the submitted address!

https://pmlearning.info

Thanks

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Tue Jan 25, 2022 1:03 am
by reekjohns
Under Apache, the limit is a configurable value, LimitRequestLine. Change this value to something larger than its default of 8190 if you want to support a longer request URI. Extremely long URLs are usually a mistake. If you keep URLs under 2000 characters , they'll work in virtually any combination of client and server software. URI actually have a character limit depending on several things. Chrome limits url length of 2MB for practical reasons and to avoid causing denial-of-service problems in inter-process communication. On most platforms, Chrome's omnibox limits URL display to 32kB ( kMaxURLDisplayChars ) although a 1kB limit is used on VR platforms. IE - 2083 characters, Firefox - 2047 characters, Safari 80000 characters and Opera 190,000 characters.

To resolve the problem :

By POST request: Convert query string to json object and sent to API request with POST

By GET request: Max length of request is depend on sever side as well as client side. Most webserver have limit 8k which is configurable. On the client side the different browser has different limit. The browser IE and Safari limit to 2k, Opera 4k and Firefox 8k. means the max length for the GET request is 8k and min request length is 2k.

If exceed the request max length then the request truncated outside the limit by web server or browser without any warning. Some server truncated request data but the some server reject it because of data lose and they will return with response code 414.

http://net-informations.com/q/mis/len.html

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Tue Jan 25, 2022 9:56 pm
by kleung
Hi Reekjohns,

Thank you very much for your explanation and advice.

cheers,
karl

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Wed Aug 24, 2022 1:13 am
by FullStack
Dear Karl

You would have to set DEFAULT_LIMIT_REQUEST_LINE constant inside of the Apache source code, and recompile Apache. This constant is in the httpd.h header file.

After this is done you can decrease request limit using the LimitRequestLine directive.

See the http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestline for more info.

hope this helps.

Re: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.

Posted: Wed Aug 24, 2022 8:22 pm
by kleung
Hi FullStack,

thank you for your advice.

cheers,
Karl