dnattinger / ni-adv-http-api

Updated HTTP Client API for LabVIEW that provides PATCH functionality and other enhancements over the built-in HTTP Client API
MIT License
4 stars 3 forks source link

Limited number of simultaneous requests #3

Open thomas-allibe-se opened 11 months ago

thomas-allibe-se commented 11 months ago

Hi there,

I'm facing an issue where I can't have more than 2 or 4 simultaneous requests using "Advanced HTTP Client\GET.vi" (but it is probably the case for other types of requests).

When I use a different handle for each GET, I can go up to 4 requests at the same time. If I share the handle between GET, it drops to 2 at the same time.

It's not coming from LV Webservice since I'm able run at least 8 simultaneous crul requests from my WSL:

thomas@WTFRLVSE247859L:~$ time curl http://localhost:80/hello/req?tag=A & curl http://localhost:80/hello/req?tag=B & curl http://localhost:80/hello/req?tag=C & curl http://localhost:80/hello/req?tag=D & curl http://localhost:80/hello/req?tag=E & curl http://localhost:80/hello/req?tag=F & curl http://localhost:80/hello/req?tag=G & curl http://localhost:80/hello/req?tag=H
[1] 85
[2] 86
[3] 88
[4] 89
[5] 90
[6] 91
[7] 92
OkOk
real    0m5.129s
user    0m0.000s
sys     0m0.031s
OkOkOkOkOkOk[1]   Done                    time curl http://localhost:80/hello/req?tag=A
[2]   Done                    curl http://localhost:80/hello/req?tag=B
[3]   Done                    curl http://localhost:80/hello/req?tag=C
[4]   Done                    curl http://localhost:80/hello/req?tag=D
[5]   Done                    curl http://localhost:80/hello/req?tag=E
[6]-  Done                    curl http://localhost:80/hello/req?tag=F
[7]+  Done                    curl http://localhost:80/hello/req?tag=G

If I add a native GET, I can have 1 more simultaneous request. Also, when I use only native GETs, I never get the same results... Sometimes all requests are performed at the same time. Sometimes, only 1 then 5, ... But it's not the purpose of this issue.

I don't know how it works in the DLL... Is it a limitation or a bug ?

See the joined zip file for an example (LV-2020 SP1): WS Multiple Req.zip

dnattinger commented 11 months ago

Let's assume for now that this is a limitation, although it surprises me. I've asked an engineer familiar with the source code of the DLL for more details, if I hear back I'll post to this thread.