HTTP 400 'Request header is too large' while using either the Easy Import or List View 'Update All' Functionality


Description

HTTP 400 response code  on the browser page and screen goes blank after applying the dynamic filter in a table.

This can also be seen when using the List View 'Update All' functionality. For example by filtering a list view with 'Name is one of INC001, NC002....INC1100' would generate a long URL due to the long List View filter.  In the List View itself that huge URL would be covered by the in-built Tiny URL (sysparm_tiny=<some sys_id> in the URL) and so would not cause an issue. But if you then click 'Update All' Tiny URL can't be used and you can hit the Tomcat URL limit and see this issue.

Cause

While accessing the URL you can see below error logs from tomcat server.

INFO | jvm 2 | 2020/05/21 22:02:55.440 | 2020-05-21 22:02:55 (378) http-nio2-16012-exec-24 Error parsing HTTP request header
INFO | jvm 2 | 2020/05/21 22:02:55.440 | Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
INFO | jvm 2 | 2020/05/21 22:02:55.440 | java.lang.IllegalArgumentException: Request header is too large
INFO | jvm 2 | 2020/05/21 22:02:55.440 | at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:718)
INFO | jvm 2 | 2020/05/21 22:02:55.440 | at org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:865)
INFO | jvm 2 | 2020/05/21 22:02:55.440 | at org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:573)
INFO | jvm 2 | 2020/05/21 22:02:55.440 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:700)
INFO | jvm 2 | 2020/05/21 22:02:55.440 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
INFO | jvm 2 | 2020/05/21 22:02:55.440 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1682)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1051)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:594)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:572)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at sun.nio.ch.Invoker$2.run(Invoker.java:218)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO | jvm 2 | 2020/05/21 22:02:55.441 | at java.lang.Thread.run(Thread.java:748)
INFO | jvm 2 | 2020/05/21 22:02:55.441 |



And in the browser the user might see an error similar to:
Error seen in user's browser

Resolution

Resolution if the issue is seen in Easy Import

After applying the dynamic filter you can see that the URL is too big to handle by the platform and that is the reason you see tomcat error messages in the app node logs, and HTTP 400 response code on the web browser. By default the underlying Tomcat web server that is used by the application can handle URLs up to 8192 characters (8KiB).

It's a tomcat limitation which we can't even modify and it's a platform level limitation. 

Also we have tiny url plugin to shorten the URL's , if system know that filtered records are making a big URL to handle then it auto creates a tiny URL with this plugin in sys_tiny_url table and using the sys_id of the tiny url you can access the records anytime without calling the large url with filters.

Tiny URL description : https://docs.servicenow.com/csh?topicname=t_EnableTinyURLSupport.html&version=latest?cshalt=yes

sample tiny url : https://instancename.service-now.com/cmdb_ci_computer_list.do?sysparm_tiny=2f0cfbe71b389850089acb7c2b4bcbff

Resolution if the issue is seen in List View 'Update All

Do one or more of: