Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#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)

ticket2498.patch (542 bytes ) - added by bartvde 16 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by sdlime, 16 years ago

Cc: warmerdam hobu added

comment:2 by hobu, 16 years ago

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.

comment:3 by hobu, 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:4 by sdlime, 16 years ago

Howard, can I reassign to you?

Steve

comment:5 by hobu, 16 years ago

Owner: changed from sdlime to hobu
Status: newassigned

I suppose, but I'm not going to be able to do anything about it for a while...

by bartvde, 16 years ago

Attachment: ticket2498.patch added

comment:6 by bartvde, 16 years ago

I've attached a patch against 5.0.2, is anybody able to verify?

comment:7 by hobu, 16 years ago

I think SE_connection_test_server is only ArcSDE 9.2+

comment:10 by hobu, 16 years ago

Resolution: fixed
Status: assignedclosed

ok. Don't know about 8.x, but this is worth it regardless. Added in r7750

comment:11 by hobu, 16 years ago

Milestone: 5.2 release
Note: See TracTickets for help on using tickets.