DbCommand timing out after an hour — oracle-tech

    Forum Stats

  • 3,716,133 Users
  • 2,242,960 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

DbCommand timing out after an hour

bwalther766 Member Posts: 1
edited April 2020 in ODP.NET

I have a long running query that's timing out after an hour, but I can't find any timeout values specified. The DbCommand has its timeout set to 0. This is wrapped within an OracleTransaction, but I can't find any timeouts at that level. On the client all I'm getting is "System.InvalidOperationException: The transaction associated with the connection has completed but not yet disposed.  Dispose the transaction to execute SQL statements on this connection" on ExecuteNonQuery for the *next* query. I'm not finding anything in the database alert log. I enabled tracing on the client, but I'm not sure what I'm looking for. I see an XCTEND rlbk=1 rd_only=0.

Any advice on why my query's timing out after an hour?


  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited April 2020

    This is a generic .NET error, which indicates the timeout originates from .NET. Can you try increasing the timeout value on your TransactionScope? If the TransactionScope is timing out, that would explain this error type. Generally, when Oracle times out, ODP.NET will output an ORA error number.

Sign In or Register to comment.