#1 2019-02-20 19:27:27

mattsbg
Member
Registered: 2017-05-23
Posts: 20

THttpApiServer - Delay in processing http requests

Hi,

we are using the TSQLDBServerHttpApi for our legacy application to proxy the sql access using http.sys and WinHttp client classes.

In load situations I noticed a delay with processing of some http requests of 500-1000 ms (also the cGetTocken and cGetDBMS command), sometimes even more.

I found out that the delay already takes place in THttpApiServer.Execute as the BeforeRequest is already delayed.
Seems like the request is read out delayed, though client and server are on the same virtual Windows 2016 Server machine and I am using the tmThreadPool, ensuring that there are enough threads available (tried with 10 to 100 server instances).

But other requests (placed later from other client processes) are processed meanwhile.

In my last load simulation we talk about 900 requests (commands) within 1 minute. The statements are simple inserts in a small table and take about 30 ms and less.

I've done a logman httptrace and it appears that the TimeCreated already contains the delay.

Any ideas what could be responsible for the delay or where I could dig into for further investigations?

Thanks,
Matthias

Last edited by mattsbg (2019-02-20 19:55:22)

Offline

#2 2019-02-20 20:33:44

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: THttpApiServer - Delay in processing http requests

It's already discussed in this topic

Offline

#3 2019-02-21 07:35:41

mattsbg
Member
Registered: 2017-05-23
Posts: 20

Re: THttpApiServer - Delay in processing http requests

Hi mpv,

thanks for your link. Didn't found it in the forum while investigating.

thanks,
Matthias

Offline

#4 2019-02-21 13:30:31

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: THttpApiServer - Delay in processing http requests

I've updated the thread linked by @mpv so you can better decide if it in any way relates to your issue or not.

Offline

#5 2019-02-27 11:55:08

mattsbg
Member
Registered: 2017-05-23
Posts: 20

Re: THttpApiServer - Delay in processing http requests

Hi pvn0,

thanks for the updating the ticket with the resolution! I think that at least the resolution in your case was something different. In my scenario the debugger is not involved.

I just have the problem that some single requests are delayed under load, all other is just working perfect.

I guess mpv is referring to ab's comment about winhttp vs socket client. I am still researching in this matter.

thanks,
Matthias

Offline

Board footer

Powered by FluxBB