thread - maximum?

Hi,

I created a Sparkle Server with one THttpServerModule. Then I tried to process 100 Connects at the same time, but the server didn?t create more than 6 threads at the same time and processed all requests in a row. How can I process more threads at the same time?

Thanks,
Robert


How did you monitored the system to be sure 6 threads were created at same time? 
And even more important, how are you sure that all requests were processed in a row?
Sparkle uses a thread pool to process the requests, so it's expected - actually desired - that it doesn't create one thread for every request.
I create a lot of parallel requests for testing purposes (a lot of users at the same time are to be expected) that need between 1 and 5 seconds (multiple database operations) each.

After initializing the connections, the IDE threadmonitor displays 6 new threads and a global counter variable I added to the THttpServerModule displays a maximum of 6 threads too.
Our database session monitor shows 6 simultaneous database connections - they are created in the "ProcessRequest" procedure - and debugging shows me that the maximum of TWinThreadPool.FWorkCount is 6. So it seems to me that the threadpool has a maximum number of simultaneous requests of 6. Eventually all my requests are processed but only 6 at a time.
I hope you get my problem and can help me to raise the number of simultaneous requests.

p.s.: The sparkle demo shows the same behaviour.

As I said, that's expected and desired. More threads doesn't mean more performance. How are you managing the connections to the database? Can you maybe post your full source code here, or at least the most relevant parts?
Wagner R. Landgraf2017-01-03 11:17:20

Would this not be dependant of the http.sys configuration if the sparkle server is running on windows?

https://support.microsoft.com/en-us/kb/820129
https://support.microsoft.com/de-de/kb/820129

Hi again and sorry, it was our mistake. We used a loop in javascript to generate the requests and as it seems there was the problem. Browsers have a different limit of connections to the same host and exactly that was causing all the trouble. 

Sparkle works as intended. Thank you for your support :)