[
https://issues.apache.org/jira/browse/CXF-8885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17747647#comment-17747647
]
Christian Habermehl commented on CXF-8885:
------------------------------------------
When it comes to workarounds:
I found one for my use case: I use spring and it's possible to provide an own
HTTPConduitFactory that creates a URLConnectionHTTPConduit like e.g.
{code:java}
public class URLConnectionHTTPConduitFactory implements HTTPConduitFactory {
@Override
public HTTPConduit createConduit(HTTPTransportFactory f, Bus bus,
EndpointInfo endpointInfo, EndpointReferenceType target) throws IOException {
return new URLConnectionHTTPConduit(bus, endpointInfo, target);
}
}
{code}
by defining it in a classpath file /cxf.xml, e.g.
{code:xml}
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="org.apache.cxf.transport.http.HTTPConduitFactory"
class="package.of.my.URLConnectionHTTPConduitFactory" />
</beans>
{code}
> HttpClient SelectorManager threads run indefinitely causing OOM
> ---------------------------------------------------------------
>
> Key: CXF-8885
> URL: https://issues.apache.org/jira/browse/CXF-8885
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 4.0.0, 3.6.0
> Reporter: Cardo Eggert
> Priority: Major
> Attachments: image (5).png
>
>
> Probably caused by https://issues.apache.org/jira/browse/CXF-8840 .
> Started to notice that when updating from 3.5.x to 3.6.0 that our servers
> started getting OOM. Noticed from the resulting logs that a lot of threads
> were active that were in the format
> HttpClient-<NR>-SelectorManager
> when reverted to 3.5.6 then it did not occur anymore.
>
> Tried to use VirtualVM when debugging it and saw when the thread was started,
> it never died, basically meaning that it ran indefinitely. OOM happened when
> there were about over 1000 of these threads.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)