This is mostly due to H2 database getting too big. So it doesn't load in 5 seconds. You can debug this using
docker logs b4f559dc829b --tail 100
If it is too big you will need to defrag it.
docker restart <containerID>; docker exec -it <containerID> /bin/bash;
wget http://repo2.maven.org/maven2/com/h2database/h2/1.4.196/h2-1.4.196.jar
cd metabase.db;java -cp h2*.jar org.h2.tools.Shell -driver org.h2.Driver -url "jdbc:h2:./metabase.db" -user "" -password "";
This will open the SQL where running the following would defrag it.
shutdown defrag;
Now that you have a smaller database copy it to your docker host and keep it safe. Also now you need to spin up a new server and copy paste the older DB file to new one.
docker cp <oldContainerID>:/metabase.db .
docker run -d -p 3000:3000 -e "JAVA_TOOL_OPTIONS=-Xmx6g" metabase/metabase docker cp metabase.db <newContainerID>:/
This is mostly due to two files.
- Docker logs filling up the system. To delete them use this
truncate -s 0 /var/lib/docker/containers/*/*-json.log
- Metabase internal DB filling up the system. To delete them,
docker exec -it <containerID> /bin/bash; cd metabase.db;
References