I''m in SERIOUS trouble - need help
xcgeek | Posted 10:10pm 13. April 2004 Server Time |
Today was a bad day. My server started crashing today and the hosting company decided it was my site that was doing it. The thing is, I havn't changed the code for a long time and it's run perfectly for months with no problems so I KNOW it's not my code. Besides there shouldn't be any way for even bad code to completly tie up an IIS 5 server (100% CPU) and bring it to it's knees. The hosting company has shut down all of my sites blaming me for everything and my wails of angst are all but lost on them.
While the server was up for a brief moment I was able to test something and it appeared as if the first page to try and connect to an Access DB started the crash. (Most of my sites are run on SQL server and they where working fine today so the asp is running fine, but a few of my sites still use Access for small menial tasks.) They said that other sites on that server that use Access are working fine but I have no way to test that. Does this ring a bell to anyone - do you know of anything that could be causing this? I personally believe that the host has got some serious issues with their server but I can't prove anything, and right now I'm dead in the water. Any ideas... |
Kodo | Posted 5:41am 14. April 2004 Server Time |
how are you connecting to the Access db's?
xcgeek | Posted 7:21am 14. April 2004 Server Time |
DSN-Less connection.
"Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb")
jmaclean | Posted 7:45am 14. April 2004 Server Time |
Check for corrupt data in the DB.
Check for a non ending loop, which I've seen.
Lastly I always use this passed along piece:
on error resume next
if isobject("conn") then
connection.close
end if
if isobject("rs") then
rs.close
end if
xcgeek | Posted 8:52am 14. April 2004 Server Time |
1. The databases are fine - I ran them locally - compant and replair, etc
2. The code is fine - I didn't change anything for this problem to start.
3. Thanks for the code tip - but I'm sure I always close my connections.
What I'm getting at is something happened yesterday to the server, something I'm getting blammed for, and I really doubt it's me. There was a new Windows Update yesterday - any possibilities there? What about hacking, could a hacker or DOS cause this? There was a useless article on MS about Access and IIS: http://support.microsoft.com/default.aspx?scid=kb;EN-US;838306 but no solution.
mickormick | Posted 10:00am 14. April 2004 Server Time |
I strongly recommend looking into this...
http://www.microsoft.com/downloads/details.aspx?FamilyID=7bd948d7-b791-40b6-8364-685b84158c78&DisplayLang=en
Informant | Posted 10:02am 14. April 2004 Server Time |
xc its very possible for code to crash a server in fact it happens all the time. With classis ASP its extremely easy it can happen with improper use of session varibles infinite loops that you may have not noticed. Also to many concurrent connections to a database that may be corrupt or the permissions have changed so you are getting dropped connections and all those requests that are causing a timeout are just eating up cpu time and memory. There are so many different causes for server crashes from bad code. It would be that your site was gaining traffic and because of that your "bad code" didnt really become bad until it started to reach a larger volume of clients. Or perhaps your db has grown to large to handle the request. I hope this gives you some more starting points to look at. At why you may be blamed for your site crashing there server.
xcgeek | Posted 10:17am 14. April 2004 Server Time |
Thanks Informant
I am going to try uploading just one component of my site to another account on their server and seeing what I can find. If it's any of the things you suggest, then it could be very difficult to debug but I will try. I know what the traffic didn't suddenly increase but I just wish the host could give me more info.
EiSa | Posted 10:23am 14. April 2004 Server Time |
I don't know if this will help you at all, but firstly I will say that your host has done a brilliant job since they were able to track your site as the problem and hunt you down,- or perhaps not.
My host had earlier problems with their 2000-server, they thought it was some neverending loops which created the problem. They said it was almost impossible to find out who created the problem. At the same time they got a 2003-server and I moved my pages there, and everything was fine for a while. Then this server also started to freeze. Again I called my host and asked what the problem was. The answer was that it probably was some neverending loops (again, almost impossible to hunt the problem-site down), OR a component on the server. It means that it could be a component on your server that is creating the problem.
To finish the story, they didn't bother to hunt down the eventually problem pages, instead there is something called application pool on W2K3-server which they started to use (It's recommended by Microsoft, don't think this exist on W2K). Correct me if I'm wrong but I'm on thin ice with rest of my explanation, but then you can put different sites into pool's. These pool's can independent of each other automatically refresh it's memory without needing to restart the server to do that. Since they did this I haven't experienced any problem. If some pages are hanging (it isn't mine that are causing that problem, that's for sure), after approx 2 minutes when I revisit those pages they work again because the pool has refreshed itself. The only problem with this is according to my experience is that sessions also will be removed, if you are logged in, suddenly you will find yourself logged out.
My advice is to move to a W2K3-server. According to Netcraft your netblock owner Velocity Networks also has W2K3-servers.
Kodo | Posted 12:07am 14. April 2004 Server Time |
Try using the JET driver as well instead of the MSACCESS Driver.
providerString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=PATHTO.MDB;Mode=ReadWrite|Share Deny None;Persist Security Info=False;Jet OLEDB:Database Password=XXXX"
xcgeek | Posted 1:05pm 14. April 2004 Server Time |
Thanks EiSa and everyone
I haven't found any code reason for this but have added a traffic monitoring system to keep track of hits, and what pages/querystrings are being called by who. This should help alot if anything happens again.
Now I have to try and convince the host to restart my site as the last word from them was "Find another hosting company."
xcgeek | Posted 1:14pm 14. April 2004 Server Time |
P.S Is there any asp way to know how long a script took to complete (or do you simply compare now() at the top and bottom of the page.)
Kodo | Posted 1:22pm 14. April 2004 Server Time |
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfcttimer.asp
xcgeek | Posted 1:25pm 14. April 2004 Server Time |
Thanks - you guys are the best
Frettmaestro | Posted 4:44pm 14. April 2004 Server Time |
Have you asked them how they found out that it was your site that created the problems? I assume that if they have taken your site(s) offline that the problems are no longer present?
The timer is actually really great to meisure the performance of your pages and if your pages take more than about 0.2 secs to render you should either look at your code or change your host. But the really hard part about the timer is that when a page totally hangs the end-timer woun't be set and you'll never find out unless you log somewhere the timer at the start of the page and at the end. This way you will also find any "orphan" timers and not only the ones that complete...
Frett
xcgeek | Posted 4:58pm 14. April 2004 Server Time |
I think they use a program like IISState: http://www.iisfaq.com/default.aspx?view=P197 to trace the asp worker thread and the site that is causing it. They said that once they stopped my site, the problems stopped, but I heard that it went down again today (and my sites are still stopped) so I still suspect a problem with the server. It could just be that my site was one of the more active ones on the server so everything worked fine once I was shut down and all the HTML sites could run smoothly again.
Today they said that I would have to be moved to 2003 so that i can get my own application pool and not crash the whole server - this is great as I don't want to get kicked off the host again - and 2003 will protect me as much as everyone else.
I like you timer idea - and I'm definitly going to implement it, I already store each hit with url, ip, and referer, so that I can track when problems might occure, but your idea is way better as it's easier to red flag actual problems.
Reply to Post I''m in SERIOUS trouble - need help
|
|
|