FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Automatically reconnecting to restarted databases

    Scheduled Pinned Locked Moved
    Q&A
    2
    2
    2.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sboykin
      last edited by

      Hello, we currently have FusionAuth running in silent mode on a Docker container in our test/QA environment. We noticed that after our cloud database was restarted, FusionAuth went down and attempts to access the UI were given the

      Silent Configuration Mode Failed
      

      response page. Is there a configuration setting(s) that would allow FA to automatically check and re-connect to a database that has been restarted beneath it, as opposed to having to manually restart the container?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        Hmmm.

        You didn't specify if you were using mysql or postgresql. That has an impact on your options.

        You could try increasing the size of the connection pool after the restart; new connections would succeed. Not sure if the connection pool FusionAuth uses is smart enough to reap the failed connections, but might be worth exploring.

        It looks like hikari (the connection pool) does support auto reconnect after database failure, but only at a certain version of the driver and with certain socket connection settings: https://github.com/brettwooldridge/HikariCP/issues/1056

        You can control the socket connection setting with the DATABASE_CONNECTION_TIMEOUT env var. And I verified that the version of the PG library is higher than that referenced in the github issue.

        Were there any other logs available?

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post