Christopher,

What connection manager are you using? If unsure, please make sure you are using the 
multithreaded connection manager. Per default HttpClient uses the so called simple 
connection manager which is not thread safe

For more details check out the HttpClient threading guide

http://jakarta.apache.org/commons/httpclient/threading.html

Hope this helps

Oleg

-----Original Message-----
From: Foran, Christopher [mailto:[EMAIL PROTECTED]
Sent: Monday, May 03, 2004 16:30
To: [EMAIL PROTECTED]
Subject: Multi-threaded problem (is this a bug?)




I have a java client which is able to create multiple threads, each thread sends a 
POST. I am able to run up to 50 threads with out a problem with my current version of 
the client.
I want to use Httpclient but this version of the java client code give an error which 
says:
[Fatal Error] :1:1: Premature end of file.

I don't generate this error and don't know where it is coming from, or what is 
generating it. The threads write their output to output files, each thread has its own 
output file. I get one of these errors for each thread I run over 10. So if I run 15 
threads I get 4 of these messages. The only major difference between the two versions 
of the java clients is the Httpclient code. The other strange thing is that all of the 
threads run successfully, and the output files contain the correct data.
Am I running out of pooled connections, or something like that?  Am I able to control 
how many pooled connections I start with?
Thanks.
[EMAIL PROTECTED] | 617.563.4785

***************************************************************************************************
The information in this email is confidential and may be legally privileged.  Access 
to this email by anyone other than the intended addressee is unauthorized.  If you are 
not the intended recipient of this message, any review, disclosure, copying, 
distribution, retention, or any action taken or omitted to be taken in reliance on it 
is prohibited and may be unlawful.  If you are not the intended recipient, please 
reply to or forward a copy of this message to the sender and delete the message, any 
attachments, and any copies thereof from your system.
***************************************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to