Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-22033

Detect misconfigured database servers: too few available connections, etc.

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion.

      Here's a query you can run on PostgreSQL to check the number of connections available:

      SELECT name, current_setting(name) 
      FROM pg_settings 
      WHERE name = 'max_connections'
      

      If this returns an insufficient number of connections, Confluence should abort start-up with a useful error message. Instead, you currently end up with exceptions occurring at runtime like this:

      2011-03-21 12:17:29,201 WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] [mchange.v2.resourcepool.BasicResourcePool] run com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@decf7d5 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
       -- referer: http://localhost:8080/confluence/setup/setupstandarddb.action | url: /confluence/setup/setupstandarddb.action | userName: anonymous | action: setupstandarddb
      org.postgresql.util.PSQLException: FATAL: remaining connection slots are reserved for non-replication superuser connections
      	at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:464)
      	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:112)
      	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
      

      For those who come across this actual issue with PostgreSQL, the fix is to increase the number of connections in postgresql.conf, and adjust the shared_buffer setting as necessary too. See the PostgreSQL documentation for more information.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              matt@atlassian.com Matt Ryall
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: