Strange query timeout issues - Oracle 10g

Posts   
 
    
jookyone avatar
jookyone
User
Posts: 104
Joined: 25-Jan-2005
# Posted on: 29-Feb-2008 16:18:24   

I am using DAL code generated using the adapter templates, targeting an Oracle 10g database. In one particular bit of code I am fetching a set of records into an entity collection, then looping through, changing a field, and executing an update of each entity. When I create the DataAccessAdapter I use the overload specifying that the connection should remain open:

using(DataAccessAdapter adapter = new DataAccessAdapter(true))
{
    // execute adapter.FetchCollection()
    foreach(entity in collection)
    {
        // change entity field
        //execute adapter.SaveEntity()
    }
}

The initial fetch into the collection runs fine, and is very fast. The second query action, the update of each entity, times out every time. I set the command timeout to 180 and it still times out. If I execute the generated update query in TOAD it executes within a few milliseconds (using same db connection info). I am obviously quite confused by this behavior, as it is clearly not an issue of a terribly-constructed query--in fact the update query is an update of a single NUMBER(1) field and using the PK in the filter clause. Yet every time I get the "ORA-01013: User requested cancel of current operation" error message.

Any ideas as to why this might be occurring?

Thanks, Larkin

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 01-Mar-2008 03:24:32   

LLBLGen version and runtimelibraries version and stackTrace (http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7725)?

(Edit) Is your application a website? Also some ORM Support classes tracing and Dynamic Query Engine tracing would be helpful to identify the problem (see Troubleshooting and Debugging at LLBLGenPro Help)

David Elizondo | LLBLGen Support Team
changomarcelo avatar
Posts: 62
Joined: 15-Feb-2007
# Posted on: 13-Mar-2008 05:40:14   

I had the same error. I think it's a timeout problem. But it seems Oracle ignores the timeout settings I pass it

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 13-Mar-2008 06:18:21   

Could you give us more info (ODP.Net version, LLBLGen version and RuntimeLibraries version), also a repro solution would be helpful and/or the LLBL generated sql.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39887
Joined: 17-Aug-2003
# Posted on: 13-Mar-2008 11:06:54   

Be aware that a timeout setting in the connection string doesn't affect the timeout for a command. that's a different timeout. The connection string timeout is for connecting to oracle, the command timeout (settable through the generated code) is for the queries.

Frans Bouma | Lead developer LLBLGen Pro