0

We have here a application that uses ODAC components inside COM+ dlls to connect to Oracle Server 11g.

Lately we are facing a problem that we cannot find the solution.

For some reason, when the concurrency of the application server at some of our clients is too high, some dlls starts to hang and they have to kill the process to restore the usability of our product. Trying to reproduce the error here at our office, we created a test environment to stress an application server. We start 30-50 programs that make calls to application and after some time the problem appears.

Debugging our DLL after the server hangs, shows that any subsequent call to OCISessionBegin cannot complete. No error is generated. No other symptoms are visible.

The last line that the we try to execute is: Check(OCISessionBegin(...)); on OraClasses.pas

We checked the database no contention, no lock.

We are using ODAC 6 on our clients, but we upgraded it to the last version and the problem persists. We have to use the Oracle Client 10 to connect to the database 11g because the are using the version 6 of ODAC.

Thanks a lot

zedmartins
  • 115
  • 1
  • 10

1 Answers1

0

AFAIK you need to create your environment with both OCI_EVENTS + OCI_THREADED attributes sets, in such a configuration.

For instance, here is how it is initialized in our Open Source direct Oracle access unit:

  fEnvironmentInitializationMode := OCI_EVENTS or OCI_THREADED;
  ...
  with OCI do
  try
    if fEnv=nil then
      // will use UTF-8 encoding by default, in a multi-threaded context
      // OCI_EVENTS is needed to support Oracle RAC Connection Load Balancing
      EnvNlsCreate(fEnv,Props.EnvironmentInitializationMode,
        nil,nil,nil,nil,0,nil,OCI_UTF8,OCI_UTF8);

I suspect you have to check how your OCI environment is created in ODAC.

Arnaud Bouchez
  • 42,305
  • 3
  • 71
  • 159