ASP.Net and query (command) timeout

Posts   
 
    
Marin
User
Posts: 9
Joined: 10-Dec-2006
# Posted on: 25-Apr-2007 23:20:28   

Hi all,

I have a website built with (asp).net2 and llblgen2, and would like to limit execution time for certain queries. For instance, critical queries (data management, and so on) that need to be executed have command timeout set to a longer interval, say 60 seconds (in connection string). There are also some non-critical queries, returning status information that is more or less just eye-candy.

Is there some way to specify a different command timeout for such queries - if I set it via DbUtils, it's a global setting, and will apply to all subsequents issued queries, which is not good simple_smile since multiple users access the site simultaneously.

Thanks, Marin.

llbl2 selfservicing, asp.net 2, postgresql 8.2.3, win2003

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Apr-2007 08:34:26   

Hi Marin, (pasted from thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=2001)

You can set the timeout using: Selfservicing: DbUtils.CommandTimeOut (static/shared) Adapter: DataAccessAdapter.CommandTimeOut (instance property)

So, as you are using SelfServicing I'm afraid isn't a way to do that in per-instance basis.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39922
Joined: 17-Aug-2003
# Posted on: 26-Apr-2007 10:01:21   

Having a larger timeout for a command isn't a problem per-se.

Also, if you need 60 seconds for a given query, please check if you need extra indexes on your tables.

Frans Bouma | Lead developer LLBLGen Pro
Marin
User
Posts: 9
Joined: 10-Dec-2006
# Posted on: 26-Apr-2007 17:56:35   

Of course it is not a problem, I would just like to have finer control over timeout, other than just one global setting simple_smile for instance, two settings would be just fine wink

As for the time it takes queries to execute, some take a lot more than a minute, and all indices I can think of have been established, the catch is that some operations are aggregated over several tables, that have record counts in range of millions.. plus there is a time component which kills indices, as most of the time fields are null..