Metabase goes down after a day of uptime on the newest version

Hello! I've upgraded Metabase and Java to the newest version, however when running Metabase as a service it goes down on its own after like a day.

This issue was not present at all on Metabase 0.49.5, we are running a separate instance of it in a different server and it stays up just fine.

However on 0.53 and beyond it will go down without leaving a log or a trace of what went wrong. Any help would be really appreciated.

  "browser-info": {
    "language": "es-419",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0",
    "vendor": "Google Inc."
  },
  "metabase-info": {
    "databases": [
      "postgres",
      "h2"
    ],
    "run-mode": "prod",
    "plan-alias": "",
    "version": {
      "date": "2025-02-25",
      "tag": "v0.53.4.1",
      "hash": "82c545d"
    },
    "settings": {
      "report-timezone": null
    },
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "14.11 (Ubuntu 14.11-0ubuntu0.22.04.1)"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.7.4"
      }
    }
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "21.0.6+7-Ubuntu-122.04.1",
    "java.vendor": "Ubuntu",
    "java.vendor.url": "https://ubuntu.com/",
    "java.version": "21.0.6",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "21.0.6+7-Ubuntu-122.04.1",
    "os.name": "Linux",
    "os.version": "6.5.11-8-pve",
    "user.language": "es",
    "user.timezone": "America/Caracas"
  }
}
type or paste code here

Logs when it goes down ?

No logs as far as we know.
When running metabase again and then check the Logs tab it doesn't show any entries from before it goes down.

ok then you need to configure Metabase to log to a file and send us the logging when it goes down

the output of the log file is always empty, here's my configuration

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
  <Appenders>
    <Console name="STDOUT" target="SYSTEM_OUT" follow="true">
      <PatternLayout pattern="%date %level %logger{2} :: %message%n%throwable">
        <replace regex=":basic-auth \\[.*\\]" replacement=":basic-auth [redacted]"/>
      </PatternLayout>
    </Console>

    <!-- This file appender is provided as an example -->

    <RollingFile name="FILE" fileName="/var/log/metabase.log" filePattern="${logfile.path}/metabase.log.%i">
      <Policies>
        <SizeBasedTriggeringPolicy size="500 MB"/>
      </Policies>
      <DefaultRoll overStrategy max="2"/>
      <PatternLayout pattern="%d [%t] %-5p%c - %m%n">
        <replace regex=":basic-auth \\[.*\\]" replacement=":basic-auth [redacted]"/>
      </PatternLayout>
    </RollingFile>

  </Appenders>

  <Loggers>
    <Logger name="com.mchange" level="ERROR"/>
    <Logger name="liquibase" level="INFO"/>
    <Logger name="metabase" level="INFO"/>
    <Logger name="metabase-enterprise" level="INFO"/>
    <Logger name="metabase.metabot" level="DEBUG"/>
    <Logger name="metabase.plugins" level="DEBUG"/>
    <Logger name="metabase.query-processor.async" level="DEBUG"/>
    <Logger name="metabase.server.middleware" level="DEBUG"/>
    <Logger name="org.quartz" level="INFO"/>
    <Logger name="net.snowflake.client.jdbc.SnowflakeConnectString" level="ERROR"/>
    <Logger name="net.snowflake.client.core.SessionUtil" level="FATAL"/>

    <Root level="WARN">
      <AppenderRef ref="STDOUT"/>
    </Root>
  </Loggers>
</Configuration>

How do I make it actually log in the metabase.log file? It keeps going down without giving any information.

Metabase released a new version, we have installed it but the issue still persists and it's still not leaving any logs behind. Please help.

Can you check if the service has enough permissions to log to the file?

It does, it creates the file but then doesn't add anything to it. The file's permissions are set for anyone to write but then it doesn't log anything at all there, the file remains blank.

This is how we run the service

nohup java -Dlog4j.configurationFile=file:/home/metabase/log4j2.xml --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar &

Still cannot get metabase.log to give logs, however the nohup.out has logged this and shows up often before stopping complitely. Any ideas?

type or paste2025-03-18 07:53:10,019 ERROR driver.util :: Failed to connect to Database
java.util.concurrent.TimeoutException: Timed out after 10,0 s
        at metabase.util.jvm$deref_with_timeout.invokeStatic(jvm.clj:291)
        at metabase.util.jvm$deref_with_timeout.invoke(jvm.clj:283)
        at metabase.util.jvm$do_with_timeout.invokeStatic(jvm.clj:298)
        at metabase.util.jvm$do_with_timeout.invoke(jvm.clj:294)
        at metabase.driver.util$can_connect_with_details_QMARK_.invokeStatic(util.clj:172)
        at metabase.driver.util$can_connect_with_details_QMARK_.doInvoke(util.clj:161)
        at clojure.lang.RestFn.invoke(RestFn.java:445)
        at metabase.sync.task.sync_databases$sync_and_analyze_database_STAR__BANG_$fn__112067$fn__112068.invoke(sync_databases.clj:80)
        at metabase.sync.task.sync_databases$sync_and_analyze_database_STAR__BANG_$fn__112067.invoke(sync_databases.clj:79)
        at metabase.sync.task.sync_databases$sync_and_analyze_database_STAR__BANG_.invokeStatic(sync_databases.clj:76)
        at metabase.sync.task.sync_databases$sync_and_analyze_database_STAR__BANG_.invoke(sync_databases.clj:69)
        at metabase.sync.task.sync_databases$sync_and_analyze_database_BANG_.invokeStatic(sync_databases.clj:105)
        at metabase.sync.task.sync_databases$sync_and_analyze_database_BANG_.invoke(sync_databases.clj:93)
        at metabase.sync.task.sync_databases.SyncAndAnalyzeDatabase.execute(sync_databases.clj:110)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) code here