You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
In scala we are crating temporary wabisabi.Client object and then loosing reference to it (expecting GC to free the memory). This object creation spawns 20+ threads that are never going to be finished and so after few hundred constructor invocations we end up with error:
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)
at org.jboss.netty.util.internal.DeadLockProofWorker.start(DeadLockProofWorker.java:38)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.openSelector(AbstractNioSelector.java:368)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.<init>(AbstractNioSelector.java:100)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.<init>(AbstractNioWorker.java:52)
at org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:45)
at org.jboss.netty.channel.socket.nio.NioWorkerPool.newWorker(NioWorkerPool.java:44)
at org.jboss.netty.channel.socket.nio.NioWorkerPool.newWorker(NioWorkerPool.java:28)
at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.init(AbstractNioWorkerPool.java:80)
at org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(NioWorkerPool.java:39)
at org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(NioWorkerPool.java:33)
at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<init>(NioClientSocketChannelFactory.java:151)
at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<init>(NioClientSocketChannelFactory.java:133)
at com.ning.http.client.providers.netty.channel.ChannelManager.<init>(ChannelManager.java:178)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.<init>(NettyAsyncHttpProvider.java:56)
at sun.reflect.GeneratedConstructorAccessor19.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.ning.http.client.AsyncHttpClient.loadDefaultProvider(AsyncHttpClient.java:544)
at com.ning.http.client.AsyncHttpClient.<init>(AsyncHttpClient.java:187)
at dispatch.Http.configure(execution.scala:21)
at wabisabi.Client.<init>(Client.scala:14)
example of threads created:
chart showing rapid increase in number of live threads
The text was updated successfully, but these errors were encountered:
In scala we are crating temporary
wabisabi.Client
object and then loosing reference to it (expecting GC to free the memory). This object creation spawns 20+ threads that are never going to be finished and so after few hundred constructor invocations we end up with error:example of threads created:

chart showing rapid increase in number of live threads

The text was updated successfully, but these errors were encountered: