none
will increased command timeout propery will create any problem RRS feed

  • Question

  • hi,

    my one page was timeouting, so i have to increase the command "timeout" in data access layer

              now it is working fine , but my concern is , it has increased the time out of all queries which gets executed on click of any  button from any where in the application, because it goes through data access layer.

    q1) will it create any problem or should i make a new function  in my data access layer for ,

    that page or long running pages.

    yours sincerely

    Monday, June 17, 2013 3:51 PM

Answers

  • There are two types of timeouts, the connection timeout which is controlled by the connection string and the command timeout which can can be set for a single command.

    Increasing the timeout value will not necessarily raise any performance cost as it only specifies the amount of time to wait before terminating the attempt to execute a command and generating an error. It does not include user processing time, only network read time , and it doesn’t set the actual execution time of the command.

    If you can't make your query run faster, your should increase the value of CommandTimeout property.

    Wednesday, June 26, 2013 2:02 PM

All replies

  • How many records are you querying, how are you querying? There are many ways to optimize queries and fetching records faster, I would have to see what is causing the lag. David Sceppa in his book on ADO.NET has many ways to optimize that sometimes go unheeded such as ordinal based lookups, strongly typed getters, putting short lived objects that implement IDisposable in using blocks, etc.
    Tuesday, June 18, 2013 7:00 PM
  • one stored proc is called to update insert delete some thousands of rows from bissiness layer.

    though  it will be rarely required,

    but  it will be required.

    so i increase the time out of command.time out. this has increased the time out of all the queries which gets fired from my app.

    will create any problem. if yes then i will make new function with increase time out of command and call it on need.

    yours sincerely


    • Edited by rajemessage Friday, June 21, 2013 2:25 PM detailed
    Wednesday, June 19, 2013 5:00 AM
  • It sounds like you need to use SSIS instead of the stored procedure. Especially if you have thousands of records.
    Monday, June 24, 2013 2:37 PM
  • thank u for ssis suggestion ,

    but my question is unanswered.

    q1) is increaseing command time out will create any problem , the function where i increased the command time out is used buy all aplication?

    yours sincerely

    Wednesday, June 26, 2013 6:50 AM
  • There are two types of timeouts, the connection timeout which is controlled by the connection string and the command timeout which can can be set for a single command.

    Increasing the timeout value will not necessarily raise any performance cost as it only specifies the amount of time to wait before terminating the attempt to execute a command and generating an error. It does not include user processing time, only network read time , and it doesn’t set the actual execution time of the command.

    If you can't make your query run faster, your should increase the value of CommandTimeout property.

    Wednesday, June 26, 2013 2:02 PM