IIS stop responding

Posted on 2007-11-26
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.


Question by:kvimal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
LVL 28

Expert Comment

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 :)

Author Comment

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.

LVL 28

Expert Comment

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.
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Author Comment

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.
LVL 28

Expert Comment

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.

Author Comment

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.
LVL 28

Expert Comment

ID: 20426184

Expert Comment

ID: 20762420
Check the log files and make sure that the IIS services are running and not being stopped for some reason.

Accepted Solution

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

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSL Certificate for IIS7 Site 2 103
How to insert .png images to TClientDataSet .cds file? 2 73
Using MMsystem To change audio input 1 20
IIS URL Rewrite syntax 5 19
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

730 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