How to fix closed connections between WSO2 ESB Analytics and a Postgresql cluster

When connecting WSO2 ESB Analytics with a Postgresql cluster that performed connection pooling, we encountered the following exceptions in the wso2carbon.log file:

This issue was related to the Postgresql database connection pooling mechanism, that invalidated connections in the WSO2 ESB Analitics DB pool. To fix this problem, we reconfigured the WSO2 ESB Analytics pool as follows in analytics-datasources.xml:

The essence of this solution are these 3 parameters:

By adding these 3 parameters, each connection taken from the pool will be validated first, before being used by the WSO2 ESB Analytics engine. Make sure you set the “validationInterval” to 0, otherwise the validation will be scheduled (the default value is 3 seconds) and the above exception can continue to appear. More details on each of these parameters can be found at https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html.

After applying this configuration change, WSO2 ESB Analytics worked fine and the above exception no longer appeared in the wso2carbon.log.

blogger

blogger

Curious to know more about this topic?

Working at i8c

i8c is a system integrator that strives for an informal atmosphere between its employees, who have an average age of approx 30 years old. We invest a lot of effort in the professional development of each individual, through a direct connection between the consultants and the management (no multiple layers of middle management). We are based in Kontich, near Antwerp, but our customers are mainly located in the triangle Ghent-Antwerp-Brussels and belong to the top 500 companies in Belgium (Securex, Electrabel, UCB, etc…).

Quality Assurance

i8c is committed to delivering quality services and providing customer satisfaction. That’s why we invested in the introduction of a Quality Management System, which resulted in our ISO9001:2000 certification. This guarantees that we will meet your expectations, as a reliable, efficient and mature partner for your SOA & integration projects.

i8c - ISO9001-2015

Also worth reading

AWS AppFlow: Streamlining SaaS Integrations with AWS Services

In today’s digital world, organizations are constantly looking for ways to streamline their workflows and improve their data management processes. One of the key challenges that organizations face is integrating their various software as a service (SaaS) applications with their data management systems. This is

Read More »

Apigee Scope Validation using OpenAPI Specification

In API security and management, we often use a lot of different security mechanisms to protect the requested resource behind the API Gateway. One of these mechanisms is the validation of scopes to authorize a client on a specific sub-resource of the API. Most of

Read More »