You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "Bhingarkar, Pushkar (GE Healthcare, consultant)" <Pu...@med.ge.com> on 2005/09/27 06:01:21 UTC

Multiple method execution happening some times after TIME OUT

Hi,
   I have been using HttpClient 2.0 for more than a few months. I
execute a method, which returns back in about 1 to 1.5 min after doing a
few things. Sometimes, when it takes longer than what is expected, I
want it to be left as it is [as the other method executions fired by
this method are executed asynchronously]. I defined a TIMEOUT value of 2
min to achieve this. Now, when TIMEOUT happens in 2 min; sometimes I
have seen that the method gets executed repeatedly a few times.
Sometimes it is executed 2-3 times, sometimes 5-6 times and today I saw
it executing the same method 8 times after the TIMEOUT. It doesn't
happen after every TIMEOUT though, but still this multiple execution is
significantly frequent.
 
Below is the sample code that we use -
                        HttpClient httpclient = new HttpClient();
                        httpclient.setTimeout(CONN_TIMEOUT); //2 min
                        httpclient.setConnectionTimeout(CONN_TIMEOUT);
                        int result =
httpclient.executeMethod(postMethodObj); //object of PostMethod
 
Does anyone know anything about this? Can anyone suggest me some quick
fix and/or long term fix for this problem?
 
Appreciate your help.
 
Thx
Pushkar