WebGIS Discussions

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Super Contributor
Posts: 447
Registered: ‎10-12-2015
Accepted Solution

Oracle connection - IsLive - any way to keep connection live?

A service that gets used periodically has occassional performance issues.

Once the service is initially run up, performance is good (sub second).

Service is not then used for a while.

When hit again (after not being used for a while) it takes 26 seconds. 

 

Comparing a before and after .GWMLog file, it is observed that the system seems to find the existing Oracle Connection and then does a test to see if it 'IsLive'. The test takes quite a while (19 seconds) and then connection is restablished which takes an additional 5-6 seconds.

 

Oracle-IsLive-PerformanceHit.png

 

Extract from 'after' GWMLog file:

2019-11-20 13:05:07 (0.059394) - This isn't either LegendEntry or Legend - getting directly
2019-11-20 13:05:07 (0.060268) - GetFromLibrary return 0
2019-11-20 13:05:07 (0.061327) - Connect ServerSmiley SurprisedracleORW.GDatabase DBSmiley Surprisedracle Source:xxxx/xxxx@XXXX Name:2D6479EF9C0091EC82E6CA5FBBBEFCF3E34A66A9
2019-11-20 13:05:07 (0.061365) - *************** From Temp
2019-11-20 13:05:07 (0.061374) - *************** From Temp
2019-11-20 13:05:07 (0.061384) - Found Same Connection
2019-11-20 13:05:07 (0.061389) - ENTERING CGWMDataSource::IsLive
2019-11-20 13:05:07 (0.061395) - Before TableDefs
2019-11-20 13:05:07 (0.061404) - Before Query
2019-11-20 13:05:07 (0.061409) - Query: Select * from GDOSYS.GALIASTABLE where 1 = 0
2019-11-20 13:05:26 (19.612281) - After Query 8004076f
2019-11-20 13:05:26 (19.612316) - Connection OracleORW.GDatabase(Oracle -- xxxx/xxxx@XXXX) is not live (Query - 8004076f)
2019-11-20 13:05:26 (19.612327) - EXITING CGWMDataSource::IsLive
2019-11-20 13:05:26 (19.640629) - Enter CGWMDataSource::Connect
2019-11-20 13:05:32 (25.109020) - Connected to data source. Get Database info.

 

Any ideas why the oracle connection is failing the 'IsLive' test and how to keep it live?

 

I'm second guessing the underlying Oracle Client or OLEDB pool or similar has closed the connection, but not really sure.

Highlighted
Occasional Contributor
Posts: 9
Registered: ‎06-20-2019

Re: Oracle connection - IsLive - any way to keep connection live?

This is very known issue,  This is related to Oracle comunication chanel timeout by default and I think is complex to change. What we do in our customers is to have a  process that runs the initialize of most used service every 1/2 hour, is the only way to keep alive and avoid large delay response when the service is not accesed for some time.

 

Highlighted
Super Contributor
Posts: 447
Registered: ‎10-12-2015

Re: Oracle connection - IsLive - any way to keep connection live?

Thanks Josep,

 

Process has been introduced to initialize every 1/2 hour and so far seems to be working.

 

I'm second guessing a firewall or similar is cutting the connection after period of inactivity. A seperate server in one part of the network is not impacted, new server in seperate part of network is impacted so would imply network/firewall.