Jump to content


Application crash/timeout with "worker process 'xxxx' failed to stop a listener channel for protocol 'http'"

worker process IIS

  • Please log in to reply
2 replies to this topic

#1 dan602


    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 92 posts

Posted 02 January 2018 - 11:46 AM

Hi Guys,


Hoping someone can give me a little bit of help with a application crash/timeout using IIS. The below works fine using stand-alone deployment - this is only an issue in my production IIS environment. ekkkk (please help)


This is reproducible every time I do the same operation - which is using a component to export a dataset to excel (the component is EMS Advanced data export)


All I do is call execute on this component to take what I have in the dataset (5 records) and output it to excel. 

I have one modal form - with the export component and a grid - all code is local to the form, apart from the dataset which is located on a datamodule.


This application has EnableSynchronousOperations := true;

I am using SSL https


1.All records are outputted correctly to the excel file (xlsx) and the file exist where I expect on the file system. It opens perfectly well.

2.As soon as the .execute method is called, I immediately call  UniSession.SendFile(_FilePath, ExtractFileName(_FilePath)); This also excutes and allows me to "download" the xlsx and the contents is fine.

3.It is at his point the application becomes unresponsive, I call modalresult := mrok on the form and nothing happens.


This is the error I am getting from windows event viewer - 


A worker process '3856' serving application pool 'AppPool' failed to stop a listener channel for protocol 'http' in the allotted time.  The data field contains the error number.
Event ID = 5138 (strange as I am using https, not http)
I can also see this event 
A process serving application pool 'AppPool' exceeded time limits during shut down. The process id was '3856'.
Event ID = 5013
UniGUI log shows nothing
It seems to just crash/timeout the session/instance of the application, not the server - once i hit refresh I can log back into the application. (obviously the issue will occur again if I try to export) 
Here are my IIS settings (should be exactly the same as per instructions from the deployment guide)
Delphi 10.1 Berlin
Unigui Complete
Thanks for any help, Dan.

  • 0

#2 dan602


    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 92 posts

Posted 02 January 2018 - 01:33 PM

Swapped out the export component, and replaced with TMS FlexCell, ran a quick test and no crash/timeout on exporting from a dataset. This obviously means the EMS export component is doing something that the ISAPI module doesn't like.

I haven't got the time to debug and need a working solution fast so this is the best option for me currently.


If any does have any ideas please still post as I would eventually like to know why this was caused.


Thanks, Dan.

  • 0

#3 Kiener


    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 148 posts
  • LocationSwitzerland

Posted 03 January 2018 - 09:33 AM

Mostly this has to do with a component who use OLE Objects internaly.


In ServerModule try AutoCoInitialize := true;


Alternatively you can do this:

  //Do your stuff here..


You have to add WinAPI.ActiveX to your "uses" section.



  • 0

Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher.


Albert Einstein

Also tagged with one or more of these keywords: worker process, IIS

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users