Add a query throttle middleware
This will keep track of the number of concurrent queries going through the query pipeline. By default it will allow half of the total Jetty connections to be used for querying via the query pipeline. By default we have 50 Jetty connections, so out of the box this number os 25. The number of query threads can be overridden vya MB_MAX_CONCURRENT_QUERIES. Once we have reached the max number of concurrent queries, subsequent queries will wait 5 seconds for a slot, then return a 503.
Showing
- src/metabase/middleware.clj 1 addition, 1 deletionsrc/metabase/middleware.clj
- src/metabase/query_processor.clj 9 additions, 4 deletionssrc/metabase/query_processor.clj
- src/metabase/query_processor/middleware/add_query_throttle.clj 51 additions, 0 deletions...etabase/query_processor/middleware/add_query_throttle.clj
- src/metabase/query_processor/middleware/catch_exceptions.clj 8 additions, 4 deletionssrc/metabase/query_processor/middleware/catch_exceptions.clj
- test/metabase/query_processor/middleware/add_query_throttle_test.clj 110 additions, 0 deletions...se/query_processor/middleware/add_query_throttle_test.clj
Please register or sign in to comment