"Encountering 'Bad Message 414: URI Too Long' Error with Linked Filters in GUI Query Builder

I am encountering an issue in Metabase's GUI Query Builder when using linked filters in a dashboard. When selecting "All" in a higher-level filter (like City or Neighbourhood), I get the following error:

php-template

CopyEdit

<h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>

Steps to Reproduce:

  1. Use the Query Builder to create a question with filters linked in a hierarchy:
  • City → Micromarket → Neighbourhood → Township → Federation → Societies → Tower
  1. Add these filters to a dashboard.
  2. Select "All" in a higher-level filter (e.g., City or Neighbourhood).
  3. The dependent filter (e.g., Township) should show all relevant values but instead triggers a 414 URI Too Long error.

Observed Behavior:

  • The request URL grows too long due to multiple selected values being passed as query parameters.
  • This results in a 414 error, meaning the request exceeds the allowable URL length in the server.

Possible Causes:

  1. Too Many Filtered Values Passed in URL:
  • Metabase may be sending all selected values as a query string, exceeding the server’s limit.
  1. GET Request Instead of POST:
  • Metabase uses GET requests for filtering, which has URL length limitations.
  1. Server Configuration Limits:
  • Web servers like Nginx, Apache, or Jetty have a maximum URL length setting that might be too low.

Potential Solutions:

  1. Increase Server URL Length Limits (if self-hosting Metabase):
  • For Nginx: Increase large_client_header_buffers:

nginx

CopyEdit

large_client_header_buffers 4 16k
  • For Apache: Increase LimitRequestLine:

nginx

CopyEdit

LimitRequestLine 20000
  • For Jetty (Metabase's default server): Set MB_JETTY_REQUEST_HEADER_SIZE=100000
  1. Use Fewer Filters or Reduce Multi-Select Options:
  • Try limiting the number of values passed in a single request.
  • Instead of selecting "All", consider using predefined groups.
  1. Force Metabase to Use POST Requests Instead of GET:
  • This may require custom modifications or checking if Metabase has an option for it.

Request for Help:

  • Is there a recommended way in Metabase to handle large filter selections without hitting the 414 error?
  • Can we configure Metabase to use POST requests instead of GET for filters?

Would appreciate any insights or alternative workarounds. Thanks! :blush:
I have attached a images for it


  1. for now only increase the jetty headers limit
  2. not for now

Where we can find the option of increasing the jetty headers limit and what should be limit set to ??