Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS6 with ASP

Status
Not open for further replies.

BCOHK

IS-IT--Management
Feb 26, 2004
9
HK
I'm new to server administration and also new to IIS6 (bad combo.) Our server has been experiencing some intermittent asp page related failures. When it fails, it won't load the simpliest asp pages. Only when I restart IIS or restart the machine does the pages work properly.

That's one problem.

Another one is that some of the asp pages ported over from the old server running IIS5 doesn't seem to work in IIS6. The asp pages accesses .mdb files to write to them.

My only hunch is that it has to do with application pooling (I could be dead wrong - since I'm not a seasoned pro like yourselves)

Please advise.
 
I have occasional lockups on my IIS machine if the database gets corrupt. That brings my system to a screeching halt.

Another thing that I noticed is that in the ODBC settings are some tweeks for MaxBufferSize, PageTimouts and most importantly Threads. If your site is using a lot of database access, you may want to play with those a little and give your ODBC process a little more beef to be able to keep up with the load.

My current web system has about 75 users on it, and we do about 400-500 database additions daily. It can search through 200,000 records in about 3 seconds and build a page from the query. It didn't do that before I turned up the settings a little.

Just my $.02

--Greg
 
Thanks for your reply. I've tripled the buffer and the threads, and doubled the timeout to 1 second. Hope that helps.

What could cause the database to be corrupted?
 
You know, that's a good question (what would cause the database to corrupt). I do know, however, that if you're using Access as your backend, that you want to use Access to rebuild your database, and not the "rebuild" that's on the ODBC tab. I've had the ODBC "rebuild" totally trash my database, making me revert to last night's backup.

Just my $.02

--Greg
 
So here I am in the office on a Saturday - just realized that beefing up the buffer and the threads and increasing the timeout didn't help.

However, I have noticed that if I unload the application pool (just clicking on the button that says 'unload') - since I'm running in IIS 5.0 isolation mode - made the "failed" asp's run instantaneously.

So Greg, where does that leave me?
 
BCOHK, first don't run IIS in 5.0 style isolation mode, the new IIS6 mode, is allot better, it provides application protection to a level not seen before in IIS, so disable IIS5 style for the sake of us all.

My busier web site on IIS6 used to stop responding every week, the only way I could get the beast to serve anything was by restarting IIS altogether, however, after much fidling about, I found out that creating a seperate app pool for the failing web site and tweaking it so it recycles faster, solved the problem, also enabled memory monitoring and recycling. Thy it.

.MDB db's are easy to use, but carry an hidden burden, as they grow the server slows, and if you have a DB with some size and it's access gets busy, the server literally stops, if it's just small DB's, say 2/3 MB max, no problem there, you've been warn, as for your access problem, check that you have the latest Jet driver installed, or that at least you are using it, as it's the fastest way to access Access DB's, another problem, is that you have to give WRITE permission on the folder the DB resides, WS2K3 is locked down be default, this must be done manually. My advice: switch to MySQL, or even better to MSSQL if you can afford it, if not, or if the requirements are small, try the free MSDE which is MSSQL scaled down.

All the best, keep us informed.

------------------------------
------------------------------
 
I did revert back to worker process mode and created a separate app pool for a part of my server over the weekend. I thought I had it solved.

Had a meeting with the staff this morning. My co-worker had restarted the server because the rapid-fail kicked in (set at 5 fails in 5 requests)

I now turned off the rapid-fail protection and reduced the recycling from 5 requests to 3 requests. I have a feeling that it is too small - but just want to keep the server from hanging. My boss has advised me to revert back to Windows 2000 Server, which I really don't want to do. But if I must to keep the server from failing.

What I'm really interested in is why the apps fail. If I can get to the root cause of the problem. Recycling the app pool seems like a temporary solution to a bigger problem.

Any ideas?
 
Tell me more about the hardware, specifically the memory on the server, secondly, tell me about your web site and it's apps, how many connections, Internet/Intranet, and your detailed description of what happen when you say server/app failing.

If you run several web sites on that server, do they all fail, or just the odd one? If you have a busy web site, it might be worth to create a seperate app pool for this web site, unless you have little memory, 512MB will do fine for this with plenty of room to spare.

Do not set process recycling too much, simply adjust it accordingly to the web site work, however you may want to set memory recycling (start at 128MB) as the default pool settings don't do this. Since I started this process my failures have disappeard, my IIS6 which runs about 6 domains and many sub-hosted, have been up for a few months now, no rebbots, service restarts or anything, just like my old Win 2000 Srv used to be, month after month after month. In my IIS6 case, no event logs were created, the main web site simply stopped responding all others were fine, if you have any log entries, let me know.

I know the pressure is on you to get this box stable, but there are many variables to consider, this matters usually don't have a easy to find culprit, do the steps I suggested above, one at a time, wait and let it run for a day or two, if it fails, do the next and so on.

Let us all know of your progress.

------------------------------
------------------------------
 
I'm currently running a Dell PowerVault 2600. 2.5GB of memory and a lot of SCSI space to play with. Our company serves streaming video over the internet for the financial sector and conferences. We wrap html content with the streaming video. In other words, embedded video in html. We employ asp technology when we want to log how long the client watches the video (through logging server variable data to Access MDBs) and/or custom login/password codes.

I'm being really conservative when I had set the server to such a low threshold before recycling. I have since up the threshold to high levels: 120 minutes / 500 requests, which ever comes first. The request queue limit has also been set to 500.

I'll consider memory recycling.

I'm also noticing that my session variables have gone to the black holes - has this to do with the process recycling itself? Should session variables stay alive, even if the worker process recycles itself? In an ideal world, it should, but logically, I wouldn't be surprised if the session variables disappear when the worker process gets recycled.

Thanks for all your comments.

 
If you give a low recycling threshold, you'll be forcing it to recycle and free resources more often than it might be needed and in fact could be a bad thing.

I have set my session to expire in 8 minutes as suggested by Microsoft as opposed to the default 20 mins, and I also beleive that when the working process that deals with a session id recycled so does the session itself, but I'm not sure, however I don't beleive this to be the problem.

In your shoes I would do:

1. Create a diff app pool for this web site as opposed to running it from the default app pool.

2. Enable memory monitoring and recycling when it reaches 128MB no less than that, in your case you could also try 192MB and 256MB.

How many websites do you run? How many fail?

Also, do this: enable as many sevice logs as you can, ODBC, WMI etc... make them write to a common dir, enable PerfMon > IIS: monitor connections, memory, processes and so on, physically monitor the server every hour, when it fails you'll know more or less when it failed, then go to the logs and see what was happening around that time.

Keeps us informed.

------------------------------
------------------------------
 
Well after a couple of days of observing and tweaking - I've ended up with only configure the worker processes to recycle at 4am or above the threshold of 256MB of maximum memory usage. I'm also limiting the number of requests in the queue to 100. So far, so good!

This only gives me time to find out what the real problem is with my ASPs ... still haven't any clue though.

It ran just fine in IIS5, no issues, no hangs .... but just after porting over the files, it hangs so much. Could it be the code? Have to look.

Thanks for all your help and suggestions - keep them coming!
 
My production server has half the memory you have, and all my problems were solved when I enabled memory recycling at 128MB, it has been running for a few months non stop, no problem.

I don't think it is the code, there are little differences btw IIS 5 and 6 such as: CDONTS is no longer the default send mail component, in fact it's not even installed by default in IIS6, also MSWC.Tools are nowhere to be found, but this would simply generate an error if you use them, not stop the whole service, so I realy beleive it's not the code.

I have the feeling the hangs are all memory related, so you might need to tweak memory recycling/usage until you find a stable setting for your case.

------------------------------
------------------------------
 
But why did it never hang when I was using IIS5? Why start now, even if I use IIS6 in IIS5 isolation mode? If it is not the code - and you may be right ... is it the OS? Is it IIS?
 
IIS5 was more rude in the way it used resources, everytime a new process was need it would simply create one, this was wasteful and slow, IIS6 re-uses processes when possible or when thresholds are reached, and it now uses a new faster optimized approach when it comes to process/memory management.

Even if you use IIS5 isolation mode, this will not give you the same 100% of IIS5 way of doing things, because underneath there's WS2K3 and it's new management system, isolation mode is only available to try to mimic IIS5 for compatibility reasons, that doesn't mean it will accomplish that in all scenarios.

I'd say you will solve your problem when you find the correct compromise in memory/process recycling for your case, even better you can create a new app pool for the failing web site/app, this will give you a seperate process/memory allocation to run this web site/app.

I would love to know a more detailed description of what you run, web sites/apps, and what exactly fails.

------------------------------
------------------------------
 
We basically run html, and streaming windows media video. We started using asp for storing small amounts of data from server variables, also using them to calculate the duration of viewing time for each IP that clicks into our website. We have several websites that spans our harddisks, nothing fancy.

I'd love to know what exactly fails. But I can only describe it as such: when I click on the link that leads to an .asp file, it hangs. No error messages on the client end, no images, no text. Just a white window where content should have been, and an hourglass as my mouse cursor. The client OS does not hang, of course. I'll have to look into any messages at the time of failure in the event log when it happens again to get any more detail.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top