c3p0.maxPoolSize change doesn't reflect inside docker container deployment

I am running Metabase Docker Containers inside AWS ECS Cluster. I have passed the following environment variable while starting the containers -

"JAVA_TOOL_OPTIONS"="-Xmx2g -Dc3p0.maxPoolSize=100"

Situation is that after the container is deployed, the maxPoolSize settings is not reflected and Metabase still only opens 15 Connections at the max. So, questions -

  1. Did I do something wrong in setting up the Environment Variable?
  2. Any other way to set the variable inside Docker containers?
  3. Any other way to verify this settings, other than monitoring the open connections at DB side?

Hi @AtanuRoy
Use this instead:
And I would not recommend setting it to 100 - specially not if you’re limiting the instance to 2GB RAM, which I’m guessing is because it’s not under heavy load.

@flamber Just exactly what I was looking for.

Regrading the number of connections, I have 16GB of RAM assigned to the Docker container. What would be a suitable Connection Pool number as per your suggestion?

I had set it to 2GB randomly. I missed the point that restricting JVM memory is actually restricting Metabase itself. Maybe you can suggest what should be the ideal % of JVM memory if the docker container is having 16GB or RAM?

You should set the number of connections to whatever is reasonable between queuing people on Metabase and overloading your database.
I cannot tell you a number, since I have no idea how many users you’re going to have or how long the queries normally run, or how many resources your database has.
You have to monitor your log and see if you start running out of connections/threads and then adjust accordingly.

14GB probably, since there should be almost no overhead on the container:

@flamber I tried setting MB_JDBC_DATA_WAREHOUSE_MAX_CONNECTION_POOL_SIZE in container.
Surprisingly, Metabase is now opening only 1 DB connection, instead of 100 (what I set) or 15 (default).
Btw, I have set 100 DB connection and allocated 6GB of RAM.

Could this be a bug or I am missing something?

Post “Diagnostic Info” from Admin > Troubleshooting.
And post the Docker run command that you’re using (redact where needed).

@flamber Below is the diagnostics Info -

I am not running a docker run command. It’s a AWS Cloudformation Template that deploys the container. What exactly you are interesting in? I can extract that part for you.

  "browser-info": {
    "language": "en-GB",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.7+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.7",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.7+10",
    "os.name": "Linux",
    "os.version": "4.14.158-129.185.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  "metabase-info": {
    "databases": [
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "12.2"
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
    "run-mode": "prod",
    "version": {
      "date": "2020-05-28",
      "tag": "v0.35.4",
      "branch": "release-0.35.x",
      "hash": "b3080fa"
    "settings": {
      "report-timezone": "Asia/Calcutta"

@AtanuRoy AWS creates so many services that I have no idea what CT is, but if you can access console on the container, then you can verify if the environment variable has been set.
Otherwise try using Docker locally on your computer - it’s probably something to do with whatever CT is.