KNOWLEDGE BASE

Tableau Keeping Database Connections Open


Published: 30 Jun 2017
Last Modified Date: 04 Apr 2019

Issue

When a live database connection is initiated by Tableau, the connection remains open, which can cause database performance issues.

Environment

  • Tableau Server 
  • Tableau Desktop

Resolution

For immediate resolution:
  • Work with your database administrator to close out connections from the database side
  • Restart Tableau Server
 To prevent later issues with connection over-utilization use one or both of the following approaches.
  • Reduce the maximum size of the connection pool using protocolcachesize.
  • Reduce the lifetime of connections in the pool using protocolcachelifetime_in_minutes.
Tableau uses the term "protocol" for database connections or sessions to distinguish from other uses of the term connection. Protocol cache is the connection pool.
  1. On the computer running Tableau Server, open a command prompt as an administrator. 
  2. Navigate to the Tableau Server bin folder
  3. Enter the following commands. (The values for each option are suggestions. Adjust the values as appropriate for your environment.)

Versions 2018.1 and older using TabAdmin

tabadmin stop
tabadmin set vizqlserver.protocolcachelifetime_in_minutes 10
tabadmin set dataserver.protocolcachelifetime_in_minutes 10
tabadmin set vizqlserver.protocolcachesize 50
tabadmin set dataserver.protocolcachesize 50
tabadmin config
tabadmin start

Versions 2018.2 and newer using TSM

tsm configuration set -k vizqlserver.protocolcachelifetime_in_minutes -v 10
tsm configuration set -k dataserver.protocolcachelifetime_in_minutes -v 10
tsm configuration set -k vizqlserver.protocolcachesize -v 50
tsm configuration set -k dataserver.protocolcachesize -v 50
tsm pending-changes apply

If receiving a warning regarding unknown configuration keys from tsm, append --force-keys flag.

Cause

Tableau Server keeps connections open in order to speed workbook load. 

Additional Information

Connections will be closed in two cases:

  • The connection hasn’t been used in protocolcachelifetime_in_minutes.
  • The size of the pool has reached protocolcachesize.

On Tableau Server 10.5 and older versions, we clear the pool only when the pool is accessed. Because of this, connections can linger on an idle server. Tableau Server 2018.2 and newer versions regularly clear the pool.


Discuss this article... Feedback Forum

Did this article resolve the issue?