ExecuteNonReader hangs

  • Thread starter Thread starter Gionni
  • Start date Start date
G

Gionni

Hello everyone,
my webservice read from (and write to) Oracle queues. It uses the
Oracle Data Provider downloaded from Oracle site (Oracle10g Data
Provider for .NET 10.1.0.2.0). Webservice calls a stored procedure
that executes the read operation. Sometimes the ExecuteNonReader()
hangs (I'd like to set a timeout on command, but OracleCommand does
not support this option). Consequently the webservice fails for
timeout.
I tested the same class without using webservice and it doesn't hangs.

Do anyone know what is the problem? Is it a bug? I'am using .NET 1.1
on Windows 2003.

Thanks, Gionni
 
Gionni said:
Hello everyone,
my webservice read from (and write to) Oracle queues. It uses the
Oracle Data Provider downloaded from Oracle site (Oracle10g Data
Provider for .NET 10.1.0.2.0). Webservice calls a stored procedure
that executes the read operation. Sometimes the ExecuteNonReader()
hangs (I'd like to set a timeout on command, but OracleCommand does
not support this option). Consequently the webservice fails for
timeout.
I tested the same class without using webservice and it doesn't hangs.

Do anyone know what is the problem? Is it a bug? I'am using .NET 1.1
on Windows 2003.

Reading from a queue is supposed to "hang" until a message becomes
available.

Are you using DBMS_AQ.DEQUEUE? There is a timeout you can set there.

David
 
David Browne said:
Reading from a queue is supposed to "hang" until a message becomes
available.

Are you using DBMS_AQ.DEQUEUE? There is a timeout you can set there.

That's my problem. In my test I use the DBMS_AQ.DEQUEUE with a low
timeout (5 seconds), then I poll the queue. The queue is always empty.
So I would expect after 5 seconds, the ExecuteNonReader returns for
timeout. Sometimes the ExecuteNonReader does not exit and hangs.
Consequently the web service times out and raises the error.
The very strange thing is that If I do not use a web service, but a
console application (same code), the ExecuteNonReader never hangs.

Thanks,
Gionni
 
Consequently the web service times out and raises the error.

I solved setting "Pooling = false" in the connection string. However I
am still ignoring why now it is working.

Cheers,
Gionni
 
Back
Top