Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6633609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:49:59+00:00 2026-05-25T22:49:59+00:00

Every now and then I see following stacktrace in the log in which, HttpClient

  • 0

Every now and then I see following stacktrace in the log in which, HttpClient socket times out trying to access text/script content from another server. My question is what config settings should I check for my J2EE app running on Weblogic, on Linux? I am specifically looking for the following.

  • JVM timeout params
  • HttpClient params
  • Weblogic timeout params or any other config like number of threads etc.
  • J2EE Application settings like servlet config etc.
  • Operating system resources like threads, file handlers and cpu
  • Any other config settings that might influence the socket connection
  • Would thread dumps help?

Here’s my code

HTTPResponse httpClientResponse;
//do some stuff
httpClientResponse.getStatusCode(); // this is where it fails

and this is the stacktrace

java.net.SocketTimeoutException: Read timed out
at jrockit.net.SocketNativeIO.readBytesPinned(Native Method)
at jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:32)
at java.net.SocketInputStream.socketRead0(SocketInputStream.java)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at HTTPClient.BufferedInputStream.fillBuff(BufferedInputStream.java:206)
at HTTPClient.BufferedInputStream.read(BufferedInputStream.java:126)
at HTTPClient.StreamDemultiplexor.read(StreamDemultiplexor.java:356)
at HTTPClient.RespInputStream.read(RespInputStream.java:147)
at HTTPClient.RespInputStream.read(RespInputStream.java:108)
at HTTPClient.Response.readResponseHeaders(Response.java:1123)
at HTTPClient.Response.getHeaders(Response.java:846)
at HTTPClient.Response.getStatusCode(Response.java:331)
at HTTPClient.RetryModule.responsePhase1Handler(RetryModule.java:92)
at HTTPClient.HTTPResponse.handleResponseImpl(HTTPResponse.java:872)
at HTTPClient.HTTPResponse.access$000(HTTPResponse.java:62)
at HTTPClient.HTTPResponse$2.run(HTTPResponse.java:839)
at HTTPClient.HTTPResponse$2.run(HTTPResponse.java:837)
at
HTTPClient.HttpClientConfiguration.doAction(HttpClientConfiguration.java:666)
at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:837)
at HTTPClient.HTTPResponse.getStatusCode(HTTPResponse.java:242) 

Thanks

I will be updating my question with the FINDINGS below.

  1. There is no explicit timeout set on HttpClient which means that http
    session timeout of the server might be taking an effect.
  2. SO_TIMEOUT for HttpClient is 0 which means that it should wait indefinitely.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:50:00+00:00Added an answer on May 25, 2026 at 10:50 pm

    Track 1

    As per the javadocs Httpclient does not seem to have have a default value of the Socket timeout. To answer the question in your update – the session timeout will not be in effect here. Weblogic’s default is 30 minutes for session timeout.

    The server session timeout represents the amount of time the HttpSession will be retained in memory if the user has not accessed the server.

    The socket timeout is the amount of time to keep the server socket open while data is being transferred back to the caller. This could even be the server is still processing and writing back data but it’s taking rather long and the client has just timed out waiting for it.

    Some links suggest this default is 60 seconds but the javadocs dont say anything, in any case you can set this value to something like 120 seconds to see if it helps

    http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpConnectionParams.html#setSoTimeout(int)

    What you need is to time the timeouts – if that’s clear. Meaning – Do these errors appear after 30 sec, 60 sec or 5 minutes of the outgoing request?

    I would change the SO_Timeout and try again

    Track 2 – OS parameters

    There are the recommended BEA parameters for NDD values which govern how long incoming connections are kept open and how many are queued and so on. On Solaris these are got by running

    /usr/sbin/ndd -get /dev/tcp tcp_time_wait_interval 
    /usr/sbin/ndd -get /dev/tcp tcp_conn_req_max_q 
    /usr/sbin/ndd -get /dev/tcp tcp_conn_req_max_q0 
    /usr/sbin/ndd -get /dev/tcp tcp_ip_abort_interval 
    /usr/sbin/ndd -get /dev/tcp tcp_keepalive_interval 
    

    Can you check the Oracle docs for the equivalent commands on Linux, and what values they should be set at. On Solaris my experience is the defaults are not enough and they need to be upped to BEA (Oracle) recommendations

    Track 3: Weblogic / External Access Logs

    Have you enabled HTTP Access Logs on the server? Do these failed requests show up with any response byte size or do they show 0 response size? What error code or HTTP status code is returned?

    Or perhaps these timed out ones are not recorded in the access logs at all?

    Here, I’m assuming the external server on which time outs occur is also Weblogic, if not – this question is directed to the external server team for their equivalent platform.

    ** Others **

    Usually thread dumps help, but the thread dumps should be taken on the server which is having a timeout problem. You are the client and you have successfully obtained a connection, after that it times out when reading the response. So is the external server overloaded ? Lack of threads? CPU high? Too many concurrent requests?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A term that I see every now and then is Cyclomatic Complexity. Here on
Every now and then Elastic Load Balancer (ELB) kicks out one of my servers
Every now and then (ahem...) my code crashes on some system; quite often, my
Every now and then I receive a Word Document that I have to display
Every now and then I need to call new[] for built-in types (usually char
Every now and then I have a problem with SVN inside eclipse folder gets
Every now and then I run into a situation when I need to email
I'm finding this problem every now and then in my production website, and it
I work with my own projects and every-now-and-then I do some work for third-parties
I've been working for years with VS's debugger, but every now and then I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.