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:
- Use the Query Builder to create a question with filters linked in a hierarchy:
- City → Micromarket → Neighbourhood → Township → Federation → Societies → Tower
- Add these filters to a dashboard.
- Select "All" in a higher-level filter (e.g., City or Neighbourhood).
- 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:
- Too Many Filtered Values Passed in URL:
- Metabase may be sending all selected values as a query string, exceeding the server’s limit.
- GET Request Instead of POST:
- Metabase uses GET requests for filtering, which has URL length limitations.
- Server Configuration Limits:
- Web servers like Nginx, Apache, or Jetty have a maximum URL length setting that might be too low.
Potential Solutions:
- 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
- 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.
- 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!
I have attached a images for it