ISAPI exception

hsteigstra

Member²
On January 4 I posted a message with a problem that occurred when opening two database connections in two ISAPI thread simulataneously. I solved my problem then by adding a critical section splitting up the two connections.
The final answer from AA was that the problem would be fixed in the next version.

After the latest version (?), still using the critical section, the problem returned(occasionally) and I get the error on connecting two sessions: "TNS: lost contact". Probably the error occurs on the first session when the second session connects.

When I remove the critical section the system seems to be much more stable, but not perfect. The error rate is much lower. Still incidently GPF's and TNS errors (lost contact / cannot locate server).

For your information the relevant code snibbit:

if not ora.Connected then
try
OraSection.Enter;
try
ora.Connected:=true;
inc(OraSection.nSessions);
finally
OraSection.Leave;
end;
except
on e:Exception do ........

System info: D5 Update pack 1, Win98 build 4.10.2222 A, Pentium III 450 Mhz, 256Mb, DOA 3.4.6.1, OCI 8, Oracle 8.0.4.2.7

Any idea what is the cause?

Thanks, Herman Steigstra
 
In 3.4.6 the logon process uses a critical section, so that 2 sessions cannot connect simultaneously. This seems to have improved stability. It may well be that the TNS:Lost contact error is in fact an Oracle Net8/Server bug. If I search Oracle MetaLink, I find several bug reports regarding this error and threaded applications.

------------------
Marco Kalter
Allround Automations
 
Thanks for your reply. Apparantly a double protection is worse than a single protection....
In my own application I also have a critical section at the closing of the connection at the OnDestroy event. The reason is that I also got GPF's when the application was closed. Did you also implement this in DOA?
 
The CriticalSection is used when connecting and disconnecting. If you free a TOracleSession and Connected = True, it will disconnect and the CriticalSection will be used.

------------------
Marco Kalter
Allround Automations
 
Back
Top