• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 730
  • Last Modified:

IIS stop responding

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.


  • 4
  • 4
1 Solution
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 :)
kvimalAuthor Commented:
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.

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.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

kvimalAuthor Commented:
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.
>> 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.
kvimalAuthor Commented:
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.
Check the log files and make sure that the IIS services are running and not being stopped for some reason.
kvimalAuthor Commented:
Analysed log files. some dlls throw exception.
Updating the lateset MDAC solves the issues.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now