Spectrum Spatial (SSA/LIM)

Welcome to the Spectrum Spatial (SSA/LIM) community - start a discussion in the discussion tab or join in a conversation.

SSA Documentation  LIM Documentation  SSA Ideas  LIM Ideas

Discussions

Members

Resources

Events

 View Only
  • 1.  How to restore database connection in Spectrum

    Posted 10-12-2017 05:31

    Restore database connection in spectrum

     

    In Spectrum (v12) i have set up a number of database connections however whenever the database connection is lost e.g. a server is restarted, or the database server is slow to respond so the connection times out, it seems the only way for those connections to be restored is to restart the spectrum service.

    So even when the database has been restored spectrum can no longer connect to the database, so no data or map can be displayed that uses that data connection.

     

    Is it possible to restore the database connection without restarting the spectrum service say through the jmc console or the command prompt.

     

    The connections in question are SQL servers using a JDBC connection string created using Spectrum Spatial manager



  • 2.  RE: How to restore database connection in Spectrum

    Posted 10-13-2017 07:35

    We can update below values in server\modules\spatial\pooling-datasource-factory.properties file

     

    # (int) The maximum number of active connections that can be allocated from

    # this pool at the same time. The default value is 20

    maxActive = 5

     

    # (int) The maximum number of connections that should be kept in the pool at

    # all times. Default value is maxActive. Idle connections are checked

    # periodically (if enabled) and connections that been idle for longer than

    # minEvictableIdleTimeMillis will be released.

    maxIdle = 1

     

    # (int) The minimum number of established connections that should be kept in

    # the pool at all times. The connection pool can shrink below this number if

    # validation queries fail. Default value is 10

    minIdle = 1

    # (int)The initial number of connections that are created when the pool is

    # started. Default value is 10

    initialSize = 0

     

    It will restore the database connection without restarting the spectrum service



  • 3.  RE: How to restore database connection in Spectrum

    Posted 10-26-2017 00:42

    Hi Ian,

    Did our solution worked for you? Is there anything else which you need help from us?

    Regards

    Varsha



  • 4.  RE: How to restore database connection in Spectrum

    Posted 10-26-2017 03:41

    Can you please try below suggestion:

    Enable below properties in C:\Program Files\Pitney Bowes\Spectrum\server\modules\spatial\pooling-datasource-factory.properties

     

    testOnBorrow = true

    validationInterval = 34000

    validationQuery= "SELECT 1"

    You can increase time for validationInterval from 34000ms to higher value for better performance.

     

    Try with above changes and let us know.

     

    Thanks,

    Rahul K



  • 5.  RE: How to restore database connection in Spectrum

    Posted 10-26-2017 20:14

    I have implemented ?Varsha Maheshwari solution by updating the pooling-datasource-factory.properties solution however the database connection (s) have not failed to test if the solution has worked so I just have to wait until this occurs.



  • 6.  RE: How to restore database connection in Spectrum

    Posted 10-27-2017 04:53

    Hi @Ian Kowalke? , I have faced the same issue with SQL server. I think this issue occurs because of the multiple connection attempts that Spectrum made with the database. If you check the task manager for DB connections and stop the multiple connections of databases, spectrum server connections will get restored.

    I would really want to try the above troubleshoot that @Rahul Kumar? and @Varsha Maheshwari? has suggested.