Solved

IIS stop responding

Posted on 2007-11-26
10
685 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:2266180
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:2266180
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 28

Expert Comment

by:2266180
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:2266180
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

864 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

22 Experts available now in Live!

Get 1:1 Help Now