Board index » delphi » Using TidHTTP in multi-threaded application
Kashif
![]() Delphi Developer |
Using TidHTTP in multi-threaded application2004-07-15 12:09:21 AM delphi172 From my desktop application, I am generating x number of threads (using delphi TThread class). Each thread is calling a local CGI by using the Indy TidHTTP component. Each CGI sends a SOAP request to an external machine (with public IP address) and get a response back. The thread then writes the response back to the main thread (desktop applicaiton). This is working just fine. If the main thread (desktop application) generates 10 threads, I can see by looking at the Windows Task Manager (Performance tab) that 10 threads are gernerated. I can also see that 10 CGIs are executing in the Windows Task Manager (Processes tab). Now, if for example, the main thread creates 50 threads, Windows Task Manager (Performance tab) shows that 50 threads are created but the Windows Task Manager (Processes tab) only shows 10 threads at a time. After few observations I found that IIS 5.0 restricting the number of HTTP calls at one given time. My first question here is that can I increase that limit??? Now, if the main thread creates 100 threads, all threads are created as normal but for 20 of those threads throw an error like "Socket Error # 10061 Connection refused". So my second question is that why I am getting this error even though the IIS is managing the number of threads at one given time. Thanks in advance. Kash |