The CreatorCon Call for Content is officially open! Get started here.

Manage database connection pool in an on premises installation

Narev
Kilo Contributor

After investigating some performance issues we came across a lot of dropped SQL traffic in our firewall. Due to regulations we need to ensure that connections between the app server and db server have a max life span of 1h. We are using Mariadb and so i think we can use the wait_timeout, interactive_timeout and idle_transaction_timeout settings. But i was wondering, these are all set on the server side, thus this will create an initial error on the client side. To me it would seem logical if i could somehow set the max duration on the connection pool settings of the app server as well, but i cannot find any documentation on how to do this.

Is there someone who knows if, and if so, how i can set the connection pool settings of the snow app server?

2 REPLIES 2

JC Moller
Giga Sage

Please note that it is not possible to modify any connection pool settings on the application server. Several years ago, we began experiencing issues with the glide.ts (text search) database connection pool. These issues were particularly evident during weekends, when users reported that their sessions would become completely unresponsive upon initiating the global text search.

In order to identify the root cause, I conducted an extensive investigation, including capturing comprehensive netstat data over the course of a weekend. This analysis revealed that sessions were being disconnected prematurely. The underlying cause was identified as the firewall terminating all sessions deemed inactive.

This issue did not affect the standard application nodes, as their connections remained continuously active, preventing session termination due to inactivity. To mitigate the problem with the glide.ts database pool, we extended the firewall’s session timeout threshold to 16 hours.

Based on this experience, I would advise against setting the maximum connection lifespan to one hour, as this is likely to result in significant operational issues. I highly recommend consulting with the support team’s on-premises specialists to ensure appropriate configuration.

AjinA
Tera Contributor

You’re right that the MariaDB timeouts (wait_timeout, interactive_timeout, idle_transaction_timeout) only work server side, which means the app just sees a broken connection after the DB closes it. To enforce a clean max connection lifespan, you need to handle it in the connection pool on the app server. Most pooling frameworks (HikariCP, Tomcat JDBC, etc.) let you set parameters like maxLifetime, idleTimeout, or connectionMaxAge so the pool refreshes connections before the DB kills them. The catch is that it depends on what connection pool Snow actually uses — if it’s not configurable, you’ll have to rely on the DB timeouts and make sure your app is set up to gracefully reconnect when sessions drop.