Increasing timeout for a single stored procedure using selfservicing

Posts   
 
    
jssenyange
User
Posts: 18
Joined: 18-Feb-2008
# Posted on: 23-Sep-2008 12:21:55   

Am using self servicing, LLBLGen Pro version 2.5. I have a stored procedure that takes long to execute and i need to change its command time out value. Changing the global command time out value, the DbUtils.CommandTimeOut property is used.

What should i do if i need to set the command time out for a single stored procedure in self servicing.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 23-Sep-2008 12:26:34   

SelfServicing you can just set the global timout property, and then you can reset it back after calling the SP.

In Adapter this can be set per database call.

jssenyange
User
Posts: 18
Joined: 18-Feb-2008
# Posted on: 23-Sep-2008 13:36:44   

Walaa wrote:

SelfServicing you can just set the global timout property, and then you can reset it back after calling the SP.

In Adapter this can be set per database call.

For example in a web application, does it mean between the period i change it and reset it to its original value,all requests made will be using the changed value?

If am supposed to change the command time out in multiple locations, then I set it and in another place in code its being reset to the original value, it means all subsequent calls will use the reset value, right?

Is it possible to edit the templates, e.g dbUtils.template, and actionProceduresAdapter.template to add the command time out as a parameter?

If yes will the newly edited template be supported if migrated to new LLBLGen Pro versions?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 23-Sep-2008 16:03:07   

or example in a web application, does it mean between the period i change it and reset it to its original value,all requests made will be using the changed value?

Yes, but anyway having a larger timeout for a command isn't a problem at all.

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

If am supposed to change the command time out in multiple locations, then I set it and in another place in code its being reset to the original value, it means all subsequent calls will use the reset value, right?

Yes.

jssenyange
User
Posts: 18
Joined: 18-Feb-2008
# Posted on: 23-Sep-2008 16:10:02   

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

My default command timeout is 10. The one I need to change to for the stored procedure is 30.