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 Chris Whitaker <wh...@gmail.com> on 2022/02/18 16:37:37 UTC

problem with high CPU in app using http-components

Hi there;

I hope this is a good place to ask about some issues I am facing.

I have a java app [on a linux vm] with an https server which waits for and
responds to requests from clients [using http-components v4.4.15].
Everything seems to function well enough but occasionally something occurs
which is causing increased CPU load.

I suspect it has to do with the TLS connection being torn down from both
sides causing some issues.  Any advice on how I should proceed would be
appreciated.

Chris

RE: problem with high CPU in app using http-components

Posted by Jo...@wellsfargo.com.INVALID.
Chris,

Take a java flight recording on the server.  If you enable recording of TLS handshakes (it's off by default,) you can see them under the event browser in Mission Control.  If you start the recording via Mission Control, you have to hit "next" a couple of times in the "start window" to get to a tree view where you can enable it.  In the tree it's under Java Development Kit | Security | TLS Handshake.  If you start from the command line, you either need to update the JDK's profile.jfc/default.jfc file or add an additional config file to enable TLS handshake recording:

    <event path="java/tls_handshake">
      <setting name="enabled">true</setting>
      <setting name="stackTrace">true</setting>
    </event>

I would expect the number of handshakes to be low because clients should be reusing their connections.

Method sampling is enabled by default and will give you can idea what's using the CPU.

Good luck


> -----Original Message-----
> From: Chris Whitaker <wh...@gmail.com>
> Sent: Friday, February 18, 2022 10:38 AM
> To: httpclient-users@hc.apache.org
> Subject: problem with high CPU in app using http-components
> 
> Hi there;
> 
> I hope this is a good place to ask about some issues I am facing.
> 
> I have a java app [on a linux vm] with an https server which waits for and
> responds to requests from clients [using http-components v4.4.15].
> Everything seems to function well enough but occasionally something occurs
> which is causing increased CPU load.
> 
> I suspect it has to do with the TLS connection being torn down from both
> sides causing some issues.  Any advice on how I should proceed would be
> appreciated.
> 
> Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: problem with high CPU in app using http-components

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2022-02-18 at 11:37 -0500, Chris Whitaker wrote:
> Hi there;
> 
> I hope this is a good place to ask about some issues I am facing.
> 
> I have a java app [on a linux vm] with an https server which waits
> for and
> responds to requests from clients [using http-components v4.4.15].
> Everything seems to function well enough but occasionally something
> occurs
> which is causing increased CPU load.
> 
> I suspect it has to do with the TLS connection being torn down from
> both
> sides causing some issues.  Any advice on how I should proceed would
> be
> appreciated.
> 
> Chris

Hi Chris

There is very little we could do unless the defect can be reliably
reproduced in a controlled environment. Is there any chance you could
put together a test application that reproduces the issue?

Oleg

PS: Please make you subscribe to the list before posting.



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org