Solved

IIS stop responding

Posted on 2007-11-26
10
684 Views
Last Modified: 2013-11-23
We have a Delphi 5 application which is built as a client-server application with http-based data exchange between server and client sides. The server side is designed as an ISAPI DLL module, which connects to database in response to the client requests obtained through HTTP messages. The server-side module uses ADO for the database connectivity.

Our problem is after subsequent requests from client application, the web server (IIS 6 and 5) stop responding. Dllhost process will show constant CPU usage but the database server will not be under any load or show evidence of outstanding /incomplete efforts. Server ISAPI DLL is somehow overloaded and stops responding. Unloading the DLL normally fail, a full iisreset is used to ensure the system is returned.

Please provide suggestions to identify the problem and how to solve this issue.


Vimal

0
Comment
Question by:kvimal
  • 4
  • 4
10 Comments
 
LVL 28

Expert Comment

by:ciuly
ID: 20349491
I would go at 2 possibilities:
1) timeout during db connect due to an incorrect use of DB connections (you will need to use a pool and configure your (connection string) in that sense )
2) incorrect release/usage of resources

the only way to track this, since you have no error, is to log everything.
presume that the problem is happening between 2 points. log those 2 points. if both points appear while IIS frozen, then presumtion was wrong. otehrsie, it was correct. so you will have to move the second point closer to the first one.
something like divede at impera.

or you can post the code adn we'll dig into it :)
0
 
LVL 5

Author Comment

by:kvimal
ID: 20349611
Thanks for your inputs.

I had also thought it was due to timeout between the database server and ISAPI Dll. Note, the application works perfectly for some time. After few hours, IIS stop responding.

If the issue happens because of timeout, is there any solution to "re-establish the connection" and/or "make the client application to work perfectly"  without restarting the IIS.

0
 
LVL 28

Expert Comment

by:ciuly
ID: 20349656
that depends on the timeout. if it's a timeout on one persistent connection, you will have to close and reopen that connection.
if it's a timeout because the db server has for ex 20 connections and all of them are used because the isapi dll did not disconnect on a non-persistent connection, then you need to find the bug and fix it so that the dll disconnects.
there is a problem either in the code, or in the configuration of the db connection or with the configuration of the db server (client knows one thing, server behaves differently)
you can imagine that without some proper clear information, there is little we can tell you. for all I know, it could be because the application has some bug that is not even DB related and at some point, for example a bad critical section management or some other stuff it gets into an infinite loop/wait.
it really can be anything. it is up to you to find aproximatly where the problem is, and if you cannot do it with trial and error, then use the logging mechanism I suggested. that one never fails. it takes a little longer, but sometimes, it is faster then trial and error, or research.
0
 
LVL 5

Author Comment

by:kvimal
ID: 20363587
We have Delphi 5.0, client-server application. Client application is installed in multiple end users machine and Server (built as ISAPI dll in Delphi) resides in Web Server (IIS). Server dll in turn connect to the MS SQL Server 2000 database using ADO.

When the client request for data, Server dll gets the data from DB and respond to the Client application. After few hours, Server stops responding to the client. When the client made further request, Web Server returns "400 Bad Request error".

We had also implemneted functionality, when the Server dll does not respond with in the One minute, then Client applciation will display the "Time out error", but doesnot free or release the any objects. After getting this error, when further request is made to the Server from Client, it is working fine.

Issue occured at customer site. We are not able to simulate this issue in our test environment. Customer are also not sure when this issue is occuring. IIS stop responding after few hours of continuous usage.

Does "IISState" tool helps us to identify the issue. Is there any other tool available to identify cause of this issue.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 28

Expert Comment

by:ciuly
ID: 20363748
>> Does "IISState" tool helps us to identify the issue.

it might. so might IISTrace.
I personally preffer logging. Have you checked the event log for any possible rerpoted problem?
but ...

>>We had also implemneted functionality, when the Server dll does not respond with in the One minute, then Client applciation will display the "Time out error", but doesnot free or release the any objects. After getting this error, when further request is made to the Server from Client, it is working fine.

let me see if I got this right: you did not make any modifications to the isapi dll, but to the client application and once tha client application had changed, after that message, everything works fine?
looks to me as this is a client bug, not a server bug. debugging the server might indicate where the freeze is happening, but there might  not be anything you can do about it (especially if it's happening on the network connection (well, you could impose a minimum speed for the incomming data and thus eliminate the case of DoS attacks (Denial of Service)).
What exactly is happening in the client? if the client is supposeed to do something and it does not, then the server obviously will freeze and eventually, IIS will freeze alltogether.
I suggest looking in the client code what happens around the new implementation. That should pinpoint where the problem lies.
0
 
LVL 5

Author Comment

by:kvimal
ID: 20425637
We had asked our customer to use IISState tool to capture the issue. we are waiting for log and dmp files fromour customer. I will post the log/dmp file contents once we received teh same.
0
 
LVL 28

Expert Comment

by:ciuly
ID: 20426184
ok
0
 
LVL 5

Expert Comment

by:Steven-Fernandez
ID: 20762420
Check the log files and make sure that the IIS services are running and not being stopped for some reason.
0
 
LVL 5

Accepted Solution

by:
kvimal earned 0 total points
ID: 20766349
Analysed log files. some dlls throw exception.
Updating the lateset MDAC solves the issues.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now