Our website was working with no issues (for a year or so) and then suddenly we started getting this timeout error. I can log in fine with a generic empty account, but people with data in their accounts are having trouble. I just received an email from one of the users (who was having the login error) stating that he was able to log into the account once and work in it fine, but when he logged out and tried to get back in later it did the same timeout error This led me to believe it was a connection timeout issue so I increased the time (in the web.config file)from 15 to 30 and then 120 with no luck. I will try to give as much info as i can, but please know that I did not create the site and am just taking over this job of maintaining it. Thanks in advance for any help The stack error (print screen) is attached Here's what I know: It is hosted on AWS and written in ASP.NET 4.0 Uses ASP.NET Ajax Library Web Server: Microsoft-IIS 8.5 The error page has the following message: The wait operation timed out Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Component Model.Win32Exception: The wait operation timed out Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. [Win32Exception (0x80004005): The wait operation timed out]
I'm not an ASP person so I'm not going to try to read the error but I'd be looking at the queries that are running. However... Anecdote I have a system running cakephp which does alot of very cool things when you run queries However It also does some pretty dumb things when you run queries All was well for a while, there were no negative repercussions from the dumb things and I had bigger fish to fry My users trucked along adding tons of records to the database Until suddenly, for some users, the site ground to a halt, timed out, had memory issues. Luckily I'd predicted that this might be a problem at some stage but I just hadn't revisited the code and years had gone by with no issues. It took about an hour to identify and fix the problem query and then another hour to go over the other key instances where this was going to happen sooner or later. Which means I suspect that you have probably a query (or two) that is pulling up more data than it should, can be tweaked and made more efficient and you'll be good to go. You need to identify the query that causes the timeout and see what it's trying to do. Chance are it's pulling up more associated records, or more fields than it needs to.
@sarahk has probably hit the nail on the head. Database structure and queries are a specialist's job. Even a small inefficiency in either can bring things to a crashing halt when scale raises it head. Note that sqlclient is the primary error source. (Please tell me that you're using a real DBMS and not Access.) I'd suggest you hire a database specialist to review and suggest improvements to the db structure and the queries you're using. My own anecdote: I had a database that tended to run slowly (partly due to recursive data manipulation in the logic tier). Since my brother in-law was CIO of a large insurance company, I asked him for advice. Well, to make a long story boring, my db structure was ok, but some of my queries (those dealing with many to many relationships) needed help. It took Les (that's his name, btw) about 10 minutes to redraft my queries. It was like a miracle; everything moved along like it should. Gratuitous advice: If you haven't already, set up a black box API between the logic tier and the DBMS. It's a security thing and, it allows for altering queries and db systems (e.g. change between MySQL, Oracle, PostgreSQL) or programming logic without one affecting the other. Testing your queries, anyone? Also, lets db admins and programmers work more or less independently. Use a black box API between the logic tier and the front end structure. IOW, use a templating engine for the same reasons as using the db API; let either be changed without affecting the other. (Do not ever inline programming code and html.) As with above, the front-end people and the programmers can work independently. Even if one person fills every position, it is still a best practice to separate the db, logic and structure. cheers, gary
@sarahk and @kk5st Thank you very much for taking the time to answer my question. I have a (bad) feeling you are correct in your analysis. I was hoping it would be something a little easier! Funny thing is that today I checked it and am able to log in with both mine (empty) and another account that has data. Logged in no problem in the morning, but this afternoon it is timing out again. Could there be something running in the background on the system that is causing a lag? I think it would be a good idea to get a database person in here to tweek it because I don't think it was built with any foresight to handle more data.
Do you perhaps have a log file filling up, or even worse, a log bring written to dB? That's a recipe for disaster if it's done wrong. The fact that it works sometimes (early in the day?) but not others also suggests that there is something that evolves - not necessarily logs, it can be badly optimised code, or a dozen other issues
Debbie, Your time-of-day experience suggests one more item to look at; activity vs time-of-day. It may or may not tell you anything, but it is one more datum, and knowing just what's happening leads to knowing why. gary