Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Created by Guest
Created on Aug 26, 2019

Kill existing Data Source connection to the database.

Sometimes the existing data source connection (say A)to the database hangs and no more new connections are established until the old connections are released. 

 

Though this can be increased(max connections) at data source level,

a) It will not clear the stale connections which require a Spotfire server(all nodes in cluster) restart which will impact all the other reports that is  using other data sources which is running fine and it's not fair to be impacted just due to data source connection A.

b) The connections some times hangs and will not work until all Spotfire servers in a cluster are restarted.

 

Instead of restarting all Spotfire servers, if there is any way to just kill that particular data source connection:A, it will be easier to maintain and support the Spotfire application and users who are consuming the service without giving entire outage to the user base.

 

Expectation: Kill connection at information designer level specific to the Spotfire server(in a cluster)

 

Benefits: It will help

1] with zero outage.

2] control the connections 

3] Remove stale connections

  • Attach files
  • Guest
    Reply
    |
    Oct 8, 2019

    What version are you on? The connection pool implementation by default attempts to detect and purge stale connections - but this functionality has been gradually improved so if you're not on the latest version you may lack some functionality.

    There are several configuration options available (depending on version):

    1. Specify (as part of the data source template) a ping command (this is actually a poor name, it should be a query, not any command) that can be used to verify that a connection is alive - for example "select 1 from SOME_KNOWN_TABLE". The query will be executed everytime a connection is retrieved from the pool - the benefit of this is that stale connections will be purged, the drawback is that it may have performance implications (if connections are retrieved frequently to execute fast queries). 
      https://docs.tibco.com/pub/spotfire_server/10.5.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-1BE3A384-25F2-4CA1-966E-534B39239CD0.html
    2. Specify (as part of the data source template) the following connection properties to achieve a similar behavior as the one described above but in the background (this takes away some of the performance concerns - but means that a stale connection may still sometimes be returned from the pool:
      "spotfire.pooling.data.source.background-ping-query" (similar to the ping command above)
      and
      "spotfire.pooling.data.source.verify-connections-on-return" (should be a boolean, the default is false)
      or
      "spotfire.pooling.data.source.verify-connections-periodically" (should be a boolean, the default is false)
      , if you set verify-connections-periodically to true then you may also want to configure
      "spotfire.pooling.data.source.connection-verification-interval-seconds" (the default is 60)

    If you still need to manually kill existing connections you can do so through a JMX connection. https://docs.tibco.com/pub/spotfire_server/10.5.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-BB4F323F-05F6-431E-9036-776053F30AA7.html