Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HttpSendRequest blocks on SOAP call

30 views
Skip to first unread message

goth...@gmail.com

unread,
May 8, 2014, 10:37:53 AM5/8/14
to
I have trouble with Delphi XE2 app. Sometimes WinInet call to ASMX service blocks and never returns - user must terminate process from task manager to close app. To connect to ASMX service app uses service generated by WSDLImp tool.

During its work, app makes a lot of calls to web service (~1000-2000). And at some moment (last time it was 782 request item, first time it was near the end) app freezes. After some digging, logging I find out that app blocks on

WinInetResult := HttpSendRequest(Request, nil, 0, DatStr.Bytes, DatStr.Size);

In Soap.SOAPHTTPTrans unit

First guess was it is some server-side problem - server hangs on request processing. But on trials server was processing requests from other clients, while target one was blocked. Also, WinInet's SendTimeout, ReceiveTimeout, ConnectTimeout has no effect - there are no timeout errors. One more point, app blocks not on specific method call, but on different ones.

After googling, I find out that HttpSendRequest can block on max parallel connections exceeded. But there are no parallel execution in app - each action is performed in main GUI thread and Process Explorer shows only one TCP\IP connection established.

Also, I have used Wireshark to log http communications.
Here is last requests to server: dropbox.com/s/lu74qgq8yi3984j/WinInet_hang.png As you can see app initializes connection with server, server waits for data from app, app sends nothing (because hangs), server resets connection.

Does anybody know why HttpSendRequest can behave like that?
0 new messages