1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: ASP.net error - Timeout Expired

Discussion in 'Software Development' started by RogueSpear00, Jan 21, 2009.

Thread Status:
Not open for further replies.
Advertisement
  1. RogueSpear00

    RogueSpear00 Thread Starter

    Joined:
    Jan 18, 2008
    Messages:
    472
    I have a pretty simple page currently that has a SQL Source that's has the following query:
    Code:
    SELECT     DialID, company, DBAname, transferred, transferred_date, salesagent, transferred_to
    FROM         contact
    WHERE     (transferred_date BETWEEN CONVERT(DATETIME, '2009-01-01 00:00:00', 102) AND CONVERT(DATETIME, '2009-01-30 00:00:00', 102))
    ORDER BY transferred_date, salesagent
    When I attempt to load my .aspx page, I get the below error 95% of the time although occassionally it successfully loads.


    The database is pretty large, which probably explains some of the time delay - but all my other select statements to this same database with far more narrow results show up much faster.

    What can I do to eliminate this problem? Can I rewrite my statement or change a setting to more efficiently work?

    Thanks!
     
  2. RogueSpear00

    RogueSpear00 Thread Starter

    Joined:
    Jan 18, 2008
    Messages:
    472
    Roughly ~:24-:28 seconds for query results, although none of the other queries against the same table (and somewhat more complex) take that long.
     
  3. RogueSpear00

    RogueSpear00 Thread Starter

    Joined:
    Jan 18, 2008
    Messages:
    472
    *knock knock* Who's there? No one! :)

    Any help would be appreciated -

    I've tried the following:
    Create a view, run the Date Source from there.
    Add a Connect Timeout to the ConnectionString.
    And several other areas within the code/vb to add a timeout increase.
     
  4. pvc_

    pvc_

    Joined:
    Feb 17, 2008
    Messages:
    490
    it might be the conversions that you're doing in the query; try simplifying the query a little bit. You might be able to find some settings for the timeout period in the web.config or the master config file. I dont program in asp.net that often to give you specific details....sorry.
     
  5. RogueSpear00

    RogueSpear00 Thread Starter

    Joined:
    Jan 18, 2008
    Messages:
    472
    Thanks for the response!

    Simplifying the query did nothing unfortunately - nor did adding any type of timeout in the web.config.
     
  6. RogueSpear00

    RogueSpear00 Thread Starter

    Joined:
    Jan 18, 2008
    Messages:
    472
    I did end up resolving this on my own - since the table was so large, I created a new index including the subset of data I was looking for. Created the index, and voila - .02 response time for query. *yay*
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/792951

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice