Queues in metabase

Hello,

is there some mechanism in metabase to handle the load of queries. for example if I want to restrict 5 queries at a time on a data source, can I achieve this?

thanks

Hi @mali
Yes, with the environment variable MB_JDBC_DATA_WAREHOUSE_MAX_CONNECTION_POOL_SIZE=5, you can make sure there’s no more than 5 connections available to your data source.
https://github.com/metabase/metabase/blob/6f271dbe7ec7598b6878dcdede88ffdfc68dcaac/docs/operations-guide/environment-variables.md#mb_jdbc_data_warehouse_max_connection_pool_size

Thank you very much.

Will it set 5 connections for every data source? I actually want to set different number of connections for different data sources based on data source capacity.

Also how can I set these environment variables if I install metabase on aws EBS?

Thanks again

@mali
Currently the variable is all or nothing. Some databases allow using a connection string parameter to limit the amount of connections. You can set those in Admin > Databases > your-db

Have a look at this topic (specially comment 13) - there’s several options for setting environment variables: Best practice for having RDS as part of EB environment

1 Like