java.lang.OutOfMemoryError: unable to create new native thread

Google Groups | Hasan Mumin | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    OOM - unable to create new native thread

    GitHub | 3 years ago | prowave
    java.lang.OutOfMemoryError: unable to create new native thread
  2. 0

    OutOfMemoryError causes spin on cpu

    GitHub | 2 years ago | tsholmes
    java.lang.OutOfMemoryError: unable to create new native thread
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [TAJO-522] OutOfMemoryError: unable to create new native thread - ASF JIRA

    apache.org | 2 years ago
    com.google.protobuf.ServiceException: java.lang.OutOfMemoryError: unable to create new native thread
  5. 0

    Another exception occurs on the client side when I run a query {noformat} Progress: 0%, response time: 190.197 sec com.google.protobuf.ServiceException: java.lang.OutOfMemoryError: unable to create new native thread at org.apache.tajo.client.TajoClient.getQueryStatus(TajoClient.java:193) at org.apache.tajo.cli.TajoCli.getQueryResult(TajoCli.java:353) at org.apache.tajo.cli.TajoCli.executeStatements(TajoCli.java:319) at org.apache.tajo.cli.TajoCli.runShell(TajoCli.java:228) at org.apache.tajo.cli.TajoCli.main(TajoCli.java:735) Caused by: java.io.IOException: java.lang.OutOfMemoryError: unable to create new native thread at org.apache.tajo.rpc.NettyClientBase.init(NettyClientBase.java:76) at org.apache.tajo.rpc.BlockingRpcClient.<init>(BlockingRpcClient.java:71) at org.apache.tajo.rpc.RpcConnectionPool.makeConnection(RpcConnectionPool.java:54) at org.apache.tajo.rpc.RpcConnectionPool.getConnection(RpcConnectionPool.java:63) at org.apache.tajo.client.TajoClient.getQueryStatus(TajoClient.java:188) ... 4 more Caused by: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:640) at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657) at org.jboss.netty.util.internal.DeadLockProofWorker.start(DeadLockProofWorker.java:38) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.openSelector(AbstractNioSelector.java:343) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.<init>(AbstractNioSelector.java:95) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.<init>(AbstractNioWorker.java:53) at org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:45) at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:45) at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:28) at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.newWorker(AbstractNioWorkerPool.java:99) at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.init(AbstractNioWorkerPool.java:69) 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:116) at org.apache.tajo.rpc.NettyClientBase.init(NettyClientBase.java:54) ... 8 more java.lang.OutOfMemoryError: unable to create new native thread 2014-01-19 23:12:19,975 WARN client.TajoClient (TajoClient.java:closeQuery(110)) - Fail to close a QueryMaster connection (qid=q_1390100273039_0012, msg=java.lang.OutOfMemoryError: unable to create new native thread) java.io.IOException: java.lang.OutOfMemoryError: unable to create new native thread at org.apache.tajo.rpc.NettyClientBase.init(NettyClientBase.java:76) at org.apache.tajo.rpc.BlockingRpcClient.<init>(BlockingRpcClient.java:71) at org.apache.tajo.rpc.RpcConnectionPool.makeConnection(RpcConnectionPool.java:54) at org.apache.tajo.rpc.RpcConnectionPool.getConnection(RpcConnectionPool.java:63) at org.apache.tajo.client.TajoClient.closeQuery(TajoClient.java:106) at org.apache.tajo.cli.TajoCli.executeStatements(TajoCli.java:323) at org.apache.tajo.cli.TajoCli.runShell(TajoCli.java:228) at org.apache.tajo.cli.TajoCli.main(TajoCli.java:735) Caused by: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:640) at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657) at org.jboss.netty.util.internal.DeadLockProofWorker.start(DeadLockProofWorker.java:38) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.openSelector(AbstractNioSelector.java:343) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.<init>(AbstractNioSelector.java:95) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.<init>(AbstractNioWorker.java:53) at org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:45) at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:45) at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:28) at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.newWorker(AbstractNioWorkerPool.java:99) at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.init(AbstractNioWorkerPool.java:69) 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:116) at org.apache.tajo.rpc.NettyClientBase.init(NettyClientBase.java:54) ... 7 more {noformat} I am not sure why client side need to create quite a lot of threads.

    Apache's JIRA Issue Tracker | 3 years ago | Min Zhou
    com.google.protobuf.ServiceException: java.lang.OutOfMemoryError: unable to create new native thread
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.OutOfMemoryError

    unable to create new native thread

    at java.lang.Thread.start0()
  2. Java RT
    ThreadPoolExecutor.execute
    1. java.lang.Thread.start0(Native Method)[na:1.8.0_40]
    2. java.lang.Thread.start(Thread.java:714)[na:1.8.0_40]
    3. java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)[na:1.8.0_40]
    4. java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)[na:1.8.0_40]
    4 frames
  3. Netty
    NioClientSocketChannelFactory.<init>
    1. org.jboss.netty.util.internal.DeadLockProofWorker.start(DeadLockProofWorker.java:38)[netty-3.10.1.Final.jar:na]
    2. org.jboss.netty.channel.socket.nio.AbstractNioSelector.openSelector(AbstractNioSelector.java:368)[netty-3.10.1.Final.jar:na]
    3. org.jboss.netty.channel.socket.nio.AbstractNioSelector.<init>(AbstractNioSelector.java:100)[netty-3.10.1.Final.jar:na]
    4. org.jboss.netty.channel.socket.nio.AbstractNioWorker.<init>(AbstractNioWorker.java:52)[netty-3.10.1.Final.jar:na]
    5. org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:45)[netty-3.10.1.Final.jar:na]
    6. org.jboss.netty.channel.socket.nio.NioWorkerPool.newWorker(NioWorkerPool.java:44)[netty-3.10.1.Final.jar:na]
    7. org.jboss.netty.channel.socket.nio.NioWorkerPool.newWorker(NioWorkerPool.java:28)[netty-3.10.1.Final.jar:na]
    8. org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.init(AbstractNioWorkerPool.java:80)[netty-3.10.1.Final.jar:na]
    9. org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(NioWorkerPool.java:39)[netty-3.10.1.Final.jar:na]
    10. org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(NioWorkerPool.java:33)[netty-3.10.1.Final.jar:na]
    11. org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<init>(NioClientSocketChannelFactory.java:151)[netty-3.10.1.Final.jar:na]
    12. org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<init>(NioClientSocketChannelFactory.java:133)[netty-3.10.1.Final.jar:na]
    12 frames
  4. Asynchronous Http Client
    NettyAsyncHttpProvider.<init>
    1. com.ning.http.client.providers.netty.channel.ChannelManager.<init>(ChannelManager.java:178)[async-http-client-1.9.20.jar:na]
    2. com.ning.http.client.providers.netty.NettyAsyncHttpProvider.<init>(NettyAsyncHttpProvider.java:56)[async-http-client-1.9.20.jar:na]
    2 frames
  5. Java RT
    Constructor.newInstance
    1. sun.reflect.GeneratedConstructorAccessor66.newInstance(Unknown Source)[na:na]
    2. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_40]
    3. java.lang.reflect.Constructor.newInstance(Constructor.java:422)[na:1.8.0_40]
    3 frames
  6. Asynchronous Http Client
    AsyncHttpClient.<init>
    1. com.ning.http.client.AsyncHttpClient.loadDefaultProvider(AsyncHttpClient.java:544)[async-http-client-1.9.20.jar:na]
    2. com.ning.http.client.AsyncHttpClient.<init>(AsyncHttpClient.java:187)[async-http-client-1.9.20.jar:na]
    2 frames