I use since more then 2 years the httpclient (first in version 3.0.1) and
now in version 3.1 on a win2000 server to make subrequest from our webapp.
Further I use this httpclient also to check the webserver by access the
server-status.

The primary problem is, that since 4 weeks I sometime can't connect via
httpclient to the webserver(on the same host). So I set the timeout to
reduce the default timeout. This happend 3 - 10 times per day with about
5-10 rq per problem. I have about 20Mil. rq on this server(per day).

Ok I know this problem occure very rare in oposite to the overall load :-)

But there exists also a problem that something(?) block the complete
webserver (all slotes are in reading(R) status). To isolate the problem I
check all components.

On of this is the httpclient libs and the timeout error.

I attach a small log (created by setting the loglevel to debug) from a small
app where I check the servre-status every 10 sec.

If the rq works well it looks like:

INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] DefaultHttpParams - Set parameter http.connection.timeout =
10000
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] DefaultHttpParams - Set parameter http.socket.timeout = 10000
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] HttpConnection - Open connection to www.eurotours.at:80
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - >> "GET /server-status HTTP/1.1[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] HttpMethodBase - Adding Host request header
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - >> "User-Agent: Jakarta
Commons-HttpClient/3.1[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - >> "Host: www.eurotours.at[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - >> "[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "Date: Mon, 01 Mar 2010 09:10:41 GMT[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "Server: Apache/2[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "Connection: close[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "Transfer-Encoding: chunked[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "Content-Type: text/html;
charset=ISO-8859-1[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] header - << "[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] HttpMethodBase - Should close connection in response to
directive: close

When the server is in a not good state I see:

INFO   | jvm 1    | 2010/03/01 10:14:36 | 2010/03/01 10:14:36:437 MEZ
[DEBUG] HttpMethodDirector - Closing the connection.
INFO   | jvm 1    | 2010/03/01 10:14:36 | 2010/03/01 10:14:36:437 MEZ
[DEBUG] HttpMethodDirector - Method retry handler returned false.
Automatic recovery will not be attempted
INFO   | jvm 1    | 2010/03/01 10:14:36 | 2010/03/01 10:14:36:437 MEZ
[DEBUG] HttpConnection - Releasing connection back to connection
manager.
INFO   | jvm 1    | 2010/03/01 10:14:36 | 2010/03/01 10:14:36:437 MEZ
[DEBUG] HttpConnection - Releasing connection back to connection
manager.
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] DefaultHttpParams - Set parameter http.connection.timeout =
10000
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] DefaultHttpParams - Set parameter http.socket.timeout = 10000
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] HttpConnection - Open connection to www.eurotours.at:80
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] header - >> "GET /server-status HTTP/1.1[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] HttpMethodBase - Adding Host request header
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] header - >> "User-Agent: Jakarta
Commons-HttpClient/3.1[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] header - >> "Host: www.eurotours.at[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:14:46 | 2010/03/01 10:14:46:437 MEZ
[DEBUG] header - >> "[\r][\n]"
INFO   | jvm 1    | 2010/03/01 10:14:56 | 2010/03/01 10:14:56:968 MEZ
[DEBUG] HttpMethodDirector - Closing the connection.
INFO   | jvm 1    | 2010/03/01 10:14:56 | 2010/03/01 10:14:56:968 MEZ
[DEBUG] HttpMethodDirector - Method retry handler returned false.
Automatic recovery will not be attempted
INFO   | jvm 1    | 2010/03/01 10:14:56 | 2010/03/01 10:14:56:968 MEZ
[DEBUG] HttpConnection - Releasing connection back to connection
manager.
INFO   | jvm 1    | 2010/03/01 10:14:56 | 2010/03/01 10:14:56:968 MEZ
[DEBUG] HttpConnection - Releasing connection back to connection
manager.
INFO   | jvm 1    | 2010/03/01 10:10:41 | 2010/03/01 10:10:41:125 MEZ
[DEBUG] HttpConnection - Releasing connection back to connection
manager.


as far as I know I don't get any exception.

After this errors I restart apache and all works like expected.
During the restart I get a timeout. (also part from the logs)

My question is: why do I not get an exception

and further can someone look into the logs and give me a hint. The question
is: is this an expect behaviour when the webserver don't work correct? When
not: how can I isolate the problem at my httpclient lib usage? Does any have
any similare problems and or experience with a problem like this?


thanks for all answers and hints

regard Dietmar

Attachment: log.txt.tar.gz
Description: GNU Zip compressed data

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to