IIS 5 & IIS 6
Connection reset isapi dll
Last post Nov 12, 2008 01:52 PM by Rovastar
Nov 09, 2008 05:25 PM|tomocro|LINK
I'm using IIS 6.0 and an isapi dll created in Delphi, and I'm getting an error which I cannot understand.
At some point when I make a request for this file I get an error in Firefox ("The connection to the server was reset while the page was loading"). At the same time http error log is full of "Connection_Abandoned_By_AppPool" messages. After this happens,
there is almost nothing I can do - I tried recycling the application pool, then I tried restarting the IIS server, and finally I reset the computer - NONE of this helped.
The only thing that resolves the issue is to recompile the dll and replace it (the source is absolutely the same). After that everything works fine.
I have a separate App pool for this dll (not executing in DefaultAppPool). At first, I thought that the problem lies in "Rapid fail protection" so I have disabled it, but the problem hapenned again.
The biggest issue is that this problem hapenned exactly 4 times in two months. It's very rare, and very hard to debug.
Finally, I have discovered on thing that could lead to the solution (with somebody's help :-)). I have enabled recycling for this pool every 2 hours. Looking at the event log in windows, I have found out that the problem always occured after the pool was
recycled. So, each time this problem hapenned I have this logged in Event log as an information message:
"A worker process with process id of '2312' serving application pool 'PromjenePool' has requested a recycle because the worker process reached its allowed processing time limit. ".
After that, in my log there is a series (hundreds, thousands) of error messages, two or three in a second, first of them coming just a few seconds after information about recycling. The warning messages are like this:
"A process serving application pool 'PromjenePool' terminated unexpectedly. The process id was '2604'. The process exit code was '0x1'. "
The first thing that my dll does is that it logs that it has been initalized to a log file. After this happens, there is no trace of initialization in my log file. So, probably dll is never loaded, or it crashes when it tries to open the file.
So, to resume, I have recycle periods of 120 mins, and about 300-400 recycles happen without any problem. After one recycle, I just keep getting error "The connection to the server was reset while the page was loading", httperr log contains loads of ""Connection_Abandoned_By_AppPool"
messages, and event log is logging that process serving my pool is terminating unexpectedly. The most bizzare thing is that recycling the dll, restarting iis or computer won't help, the only thing that surely helps is to recompile the dll (same source).
Just to add - if it can help - all dll is basically doing is connecting via TCP sockets to a data feed, constantly reads data and publishes it through dll. There is no connection to database, just sockets and appending messages to local file.
Can anybody help me anyhow?
Thanks in advance!
Nov 12, 2008 01:52 PM|Rovastar|LINK
If a reset of the machine doesn't fix the problem I can only assume that it somehow the dll is storing some info. A reset will reset all things that could maybe be a problem like a running out of sockets, etc
I cannot imagine it is an IIS issue. Maybe some corruption of the dll but with a restart to makes no sense either.
Does re-registering your dll make a difference?