Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Teams
, (opens new window)

SQL for Confluence
Results will update as you type.
  • Get started
  • Data Center 11.x
    • Help and support - 11.x
    • Use cases - 11.x
      • Use HTML in Queries - 11.x
      • Limit active database connections - 11.x
      • Use Confluence metadata in SQL queries - 11.x
      • Avoid format errors when using output=wiki - 11.x
      • Publish SQL queries on Atlassian Cloud - 11.x
      • Advanced column styles - 11.x
      • Filter table data - 11.x
      • Log SQL activity - 11.x
      • Improve the display of SQL source - 11.x
      • Create a Pie chart using the SQL macro - 11.x
      • Inline SQL data - 11.x
      • Create an xyArea Chart using the SQL Macro - 11.x
      • Use regular expressions - 11.x
      • Use SQL macros securely - 11.x
      • Advanced row styles - 11.x
      • Add queries within queries - 11.x
      • Create an xyLine Chart using the SQL macro - 11.x
      • Run SQL queries securely, without page edit restrictions - 11.x
      • Datasource problem determination - 11.x
      • Combine queries from multiple databases - 11.x
      • Create a chart with SQL - 11.x
      • Limitation of macros=true parameter while using nested SQL queries - 11.x
      • Index SQL data - 11.x
      • Implement role based security for PostgreSQL database - 11.x
      • Use SQL case statement to improve the visual appeal - 11.x
      • Use SQL Macro with Markup - 11.x
      • Create a Bar chart using SQL macro - 11.x
      • Implement role based security for SQL queries - 11.x
      • Configure data source profiles 11.x
      • Use SQL File Macro with Markup - 11.x
      • Configure application server based datasources - 11.x
      • Limit query time - 11.x
      • How to convert an application server defined data source profile to a connection string profile
    • Macro Reference - 11.x
    • Key Concepts - 11.x
    • Overview - Data Center 11.x
    • Installation and configuration - Data Center
  • Cloud
  • Release notes
  • Help and support
    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Limit active database connections - 11.x
    Updated Aug 18

    Limit active database connections - 11.x

    Data source profiles

    With release 7.0, a new parameter is available on data source profiles called maxActive which can be used to limit the number of actively executing SQL queries for a specific data source. Once the maximum active limit is reached, the next requested render of a SQL macro using the specific data source returns an error message instead of trying to connect to the database. The message is something like:

    Unable to process your request at this time. Try again later. The connection limit was reached for this data source.

    This gives administrators a way to help manage database connections. This provides control over data source profiles similar to what is available for application server based data sources configured in server.xml.

    Application server based data sources

    Application server based data sources have various management parameters including maxActive and maxWait. See Tomcat JDBC Connection Pool.

    If you need to further limit the number of connections used by SQL macros, then you can use maxActive data source profile setting to also control the application data source by referencing the application data source in the data source profile. For example, if myDS is an application defined data source, then the following data source profile would further restrict SQL macro connections:

    Name

    Value

    Name

    Value

    myDS

    dataSource=myDS | maxActive = 10

    Need support? Create a request with our support team.

    Copyright © 2005 - 2025 Appfire | All rights reserved.

    {"serverDuration": 27, "requestCorrelationId": "9bd4886694724f219028e1ede4e48e4d"}