This article is a basic guideline for understanding database connection issues, and how to best troubleshoot.
It's a good idea to first understand how the connection pool works before reading further.
Data source/Yellowfin DB won't connect
This is for cases where the connection itself states it cannot be made. There are a number of reasons for this, all of which are usually easily identifiable, as the error is generally returned by the driver. E.g. 'Authentication failed', 'Cannot find database..', 'Cannot open port'.
In these cases it's imperative that you confirm the connection details are correct, and can be used from the same server that Yellowfin is installed on, and also connecting via the same method as Yellowfin (e.g. JDBC)
You can easily do this via a free 3rd party query tool such as DBVisualizer or SQLSquirrel.
If testing the connection within that tool also fails, it's confirmation that the issue lies on the DB/Network side, and should be resolved the DBA.
However if these tests succeed further investigation is needed.
Database connections are flaky
There are cases where a data source connection is known as not being reliable, and forced refreshes of the connection pool is needed.
Please keep in mind, while this 'can' help, it's always best to tackle the underlying cause than try to work around it.
By default connections will be refreshed every 3 hours and can be changed via the connection settings to bring it down to 1hr.
However, you can also refresh the connections more frequently using one of 2 options;
Connections are timing out
If a connection has been checked out, and is not released before the TimeOut parameter, it will be forcible closed.
You will see the "TimeoutExceeded" message in the JDBC/Source logs.
This would usually occur in 2 scenarios:
- The connection is currently invalid.
While it was ok during the data source creation, it is no longer working. In these cases, resolve the connection issue. - The connection is open too long.
This could occur when running a large report, or refresh schedule, and it's taking too long to return the data.
In these cases you have a few options; Increase the timeout, modify the content (e.g. limit results) so it returns quicker. If it's in relation to a scheduled task you can also use the secondary connection pool.
All connections are being used up
When the max number of connections have been used, further connections cannot be made. In these cases you will see "Maximum connections exceeded" within the JDBC/Source logs. You have a few ways of addressing this; Increase max no. of connections, find out if some connections are open longer than needed (e.g. content is inefficient), too many schedules running at once. If it's in relation to a scheduled task you can also use the secondary connection pool.
If you have any questions, or running into issues relating to connections, please raise a ticket with our support team.
Regards,
The Yellowfin Support Team.