#2498 closed defect (fixed)
Mapserver/Fastcgi losing connection to SDE when SDE is shutdown/restarted
Reported by: | SLIPGIS | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | 5.2 release |
Component: | MapServer CGI | Version: | 5.0 |
Severity: | normal | Keywords: | fastcgi |
Cc: | warmerdam, hobu |
Description
Mapserver connecting to a Oracle/SDE database with Fastcgi, when SDE is shutdown/restarted every morning the connection pool appears become corrupt and Mapserver cannot connect.
The SDE data is refreshed each night into an inactive database then in the morning SDE is shutdown and the inactive database is swapped with the active one, SDE is then restarted. At this point Mapserver cannot re-establish a connection to SDE.
Attachments (1)
Change History (12)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Thinking about this more, it might be possible to know we're bunk and relight the connection.
1) Put a test here that checks the viability of the pool's connection handle http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapsde.c#L1047
2) If bad, release the old pool handle and create a new one. (Some of the SDE free functions might need to connect to the db though).
comment:5 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I suppose, but I'm not going to be able to do anything about it for a while...
by , 16 years ago
Attachment: | ticket2498.patch added |
---|
comment:8 by , 16 years ago
Howard, it is also available in 9.1, see:
http://edndoc.esri.com/arcsde/9.1/capi_functions/dbase_connects/se_connection_test_server.htm
comment:9 by , 16 years ago
And even 9.0 has it :-) see:
http://edndoc.esri.com/arcsde/9.0/capi_functions/dbase_connects/se_connection_test_server.htm
comment:10 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
ok. Don't know about 8.x, but this is worth it regardless. Added in r7750
comment:11 by , 16 years ago
Milestone: | → 5.2 release |
---|
The handle to SDE that fastcgi is storing is now bunk when you shutdown the server. You have to restart MapServer so it can create a fresh handle (and a good connection).
I don't see a good way to trap this error either. Once the handle is bad, no further calls to it seem to work, so it is difficult to relight the connection.