Forum Moderators: open

Message Too Old, No Replies

Asp / IIS 5 -> Tuning up

Need help!

         

FrenchGuy

10:16 am on Jan 15, 2003 (gmt 0)

10+ Year Member



We have following situation:

Our site runs on IIS 5 with asp and SQL Server. We have regularly periods, where 500 Errors become more, until several hundreds per hour, then we have to reboot the server (either the web-server, or the SQL server).

I suppose that some objects are not beeing closed / set to nothing or some other problems of the same nature, but we have no influence on the asp code for the moment.

Is there anything we can configure on IIS to make sure that the problems that are generated by "bad code" have less consequences?

Ist there a parameter to determine how often unused objects are beiing closed and "set to nothing" automatically?

wardbekker

10:41 am on Jan 15, 2003 (gmt 0)

10+ Year Member



Hi FrenchGuy,

You could set the ASP script timeout to 20 seconds (default is 90 i believe). That way long running pages time out faster. If a ASP page takes more than 20 seconds to load, in most cases the programmer has to do a better job.

Because the garbage collection (cleaning up of objects that is not needed anymore) of IIS 5 is still not optimal, explicit setting objects to nothing is still a good practice.

You should identify the pages that cause this snowball effect and notify the author if you want to solve it in the long run.

txbakers

2:10 pm on Jan 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you must set every object you create - especially connections to "nothing" in VB script at the end of the page.

I had a similar problem - the app ground to a halt because of memory leaking.

I don't know of a utility, but I did it by hand. Just went through and found every object that was created, and nullified it.

graywolf

3:48 pm on Jan 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



We used to have this problem as well, the servers had to be rebooted every 3-4 days. About a year ago we started going thru the code making sure all the objects were being closed as well, we extended it to 7-10 days between reboots. Then we thru and modified the code so it was opening 1 connection on every page (yes it was a big project). We have gone as long as three weeks without a reboot, but I try to reboot once a week as a predictive maintenance plan.

aspdaddy

4:13 pm on Jan 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Is there anything we can configure on IIS..

Think there is a setting when configuring a new web to make it run in its own process. If it screws up it shouldnt affect other webs.

graywolf

8:40 pm on Jan 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



if you have a development server(this way you can isolate what is going on) open a dos window and run a netstat command, that will show you all the open connections. Browse the pages one at a time reentering netstat each time. That will tell you which pages are opening the most connections and give you someplace to start. You probably aren't going to be able to solve this until you can get into the code.

FrenchGuy

10:07 pm on Jan 20, 2003 (gmt 0)

10+ Year Member



Another isssue is that the asp code and SQL Server are accessing data to another Server which is running on AS400.

The weird thing is that we didnīt have the 500 Error problem for a week now. There is no pattern according to which it regularly occures and the traffic has definitly no direct influence!

I begin to wonder if some troubles in the connection to the AS400 or the AS400 server itself might be the cause...

aspdaddy

10:16 pm on Jan 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could be, I have seen similar with an oracle connection, using non-ms drivers is notorious problem.

Have you got error handling on? If you havent and the script fails, your objects are not closed/destroyed.

webdevsf

10:22 pm on Jan 20, 2003 (gmt 0)

10+ Year Member



Which driver are you using to connect to the AS400? I had a similar problem at a previous client. It ended up being related to using the IBM driver I think.

Go to usenet and do a search for AS/400 and asp. I think there should be some articles there.

FrenchGuy

10:22 am on Jan 21, 2003 (gmt 0)

10+ Year Member



I have checked the logs.

A few errors are [IBM][Client_Access_Express_ODBC-Treiber_(32-Bit)] -> connection to AS400 interrupted

However, most of them are ASP_0147 ("not enough ressourses"). Can ASP_0147 happen due to a poor connection to AS400, for instance because while the Script tries to access it swallows the web-server or SQL-server ressources?

webdevsf

9:35 pm on Jan 21, 2003 (gmt 0)

10+ Year Member



Go check if there is an updated version of the Client Access driver on IBM's site. Also, I think Microsoft has one too, that might work better.

Finally, talk to the people who run the AS/400 to make sure that they are not running some job that is hanging your requests - that was part of the problem that happened to us.

txbakers

9:37 pm on Jan 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would make sure that you are using the latest version of Client Access, and make sure you have the latest patches as well.

I've had so many mystery ASP and other data problems with the AS/400 that simply turned out to need the newest patch for CA. Everytime the SYSADM loads an OS patch to the 400 you will need to check the client access.

While we're on the subject - is there a direct connection to the AS/400 yet, or is it still ODBC only?

webdevsf

1:07 am on Jan 22, 2003 (gmt 0)

10+ Year Member



I think IBM and microsoft both have ole db drivers

[www-1.ibm.com...]

microsoft's is somewhere under Host Integration Server. Couldn't find the link...