Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Firedac with FDManager in an ISAPI hangs



Permlink Replies: 1 - Last Post: Feb 14, 2017 5:03 AM Last Post By: David Wilcockson
David Wilcockson

Posts: 3
Registered: 2/16/04
Firedac with FDManager in an ISAPI hangs
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 13, 2017 9:29 AM
I am using Firedac in an ISAPI with FDManager to allow connection pooling. While the ISAPI runs all is fine with a marked improvement in performance.

However when IIS unloads the ISAPI it hangs when the FDManager is closed.

I've tried

1) Putting FDManager.close in the finalization section of a unit
2) Hooking into Web.WebBroker.Application.OnUnload

However they all result in the same problem. I've seen reference to the need to call FDManager.Close before the ISAPI is unloaded, but I've no idea how to do that as IIS itself is closing the ISAPI.

Many thanks

David
David Wilcockson

Posts: 3
Registered: 2/16/04
Re: Firedac with FDManager in an ISAPI hangs
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 14, 2017 5:03 AM   in response to: David Wilcockson in response to: David Wilcockson
However when IIS unloads the ISAPI it hangs when the FDManager is closed.

Solved!

Thanks to https://mathiaspannier.wordpress.com/2016/07/17/how-to-properly-cleanupshutdown-a-delphi-isapi-which-uses-threads/ I've now worked out how to close Firedac connection pooling properly.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02