Thanks for the response we will try this.

Regards,
Radhika

-----Original Message-----
From: Zdeněk Henek [mailto:vrab...@gmail.com] 
Sent: Tuesday, September 19, 2017 2:27 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new 
native thread Exception in Catalina.out after upgrading to RHEL 7.4

Hi,

try configure HTTP NIO
https://urldefense.proofpoint.com/v2/url?u=https-3A__tomcat.apache.org_tomcat-2D7.0-2Ddoc_config_http.html-23NIO-5Fspecific-5Fconfiguration&d=DwIFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=W2ISzfcNZyKTlMxlNJ9FPQ&m=LAXeta_7sl2gYpz48nwzAR9XkW3dKO7EMeo2ogEl3_4&s=QlTtns7hmM6TFpupVKM93CQfMd1o0tsF1cj3-aPBKOo&e=
or upgrade to Tomcat 8 where HTTP NIO is on by default.

This could help in case your server is able to process the requests e.g.
you have spike where you have to process thousands of requests, but these are 
quick and you don't care much how quickly you get response.

Regards,
Zdenek Henek

út 19. 9. 2017 v 10:51 odesílatel Peddi, Radhika (Radhika) <rpe...@avaya.com>
napsal:

> Hi,
>
> We have upgraded RHEL 7.2 to RHEL 7.4. After upgrade when we are 
> running performance testing of our application we are seeing below 
> error in catalina.out.
>
> java.lang.OutOfMemoryError: unable to create new native thread 
> Exception in Catalina.out after upgrading to RHEL 7.4
>
> Attached is the thread dump.
>
> We are using Tomcat 7.0.69.
>
> As per REDHAT we have increased tomcat5 user which used to run Tomcat 
> process in /etc/security/limits.d/20-nproc.conf like below
>
> * soft nproc 4096
> root soft nproc unlimited
> tomcat5 soft nproc 8192
>
> All the processes are used by Tomcat. If we increase the value to 16K 
> or 32K all threads are consumed and they are in Waiting(Parking) state.
>
> "http-bio-8443-exec-56" #973 daemon prio=5 os_prio=0
> tid=0x00007efc8c029800 nid=0x10e7b waiting on condition [0x00007ef9bc7ee000]
>    java.lang.Thread.State: WAITING (parking)
>                 at sun.misc.Unsafe.park(Native Method)
>                 - parking to wait for  <0x00000003c454c008> (a
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>                 at
> java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>                 at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>                 at
> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>                 at
> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104)
>                 at
> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32)
>                 at
> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
>                 at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
>                 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>                 at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>                 at java.lang.Thread.run(Thread.java:745)
>
> "http-bio-8443-exec-55" #972 daemon prio=5 os_prio=0
> tid=0x00007efc0401e000 nid=0x10e7a waiting on condition [0x00007ef9bc82f000]
>    java.lang.Thread.State: WAITING (parking)
>                 at sun.misc.Unsafe.park(Native Method)
>                 - parking to wait for  <0x00000003c454c008> (a
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>                 at
> java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>                 at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>                 at
> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>                 at
> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104)
>                 at
> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32)
>                 at
> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
>                 at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
>                 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>                 at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>                 at java.lang.Thread.run(Thread.java:745)
>
> They are not getting release. After some time Tomcat getting stopped 
> automatically. You may need the output of below from our setup.
>
> [root@iqsvtk05<mailto:root@iqsvtk05> ~]# rpm -qif 
> /opt/coreservices/tomcat-7.0.69/logs/
> Name : tomcat
> Version : 7.0.69
> Release : AV10
> Architecture: x86_64
> Install Date: Fri 18 Aug 2017 01:41:54 AM MDT Group : System 
> Environment/Daemons Size : 8468465 License : Apache License, Version 
> 2.0 Signature : (none) Source RPM : tomcat-7.0.69-AV10.src.rpm Build 
> Date : Fri 24 Jun 2016 01:59:37 AM MDT Build Host : 
> puiqx3650dev03.apac.avaya.com Relocations : /usr/share Packager : 
> Avaya, Inc.
> Vendor : Apache Software Foundation
> URL : 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__tomcat.apache.org_
> &d=DwIFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=W2ISzfcNZyKTlMxlNJ9FPQ&m=LAXeta_7
> sl2gYpz48nwzAR9XkW3dKO7EMeo2ogEl3_4&s=hOw90JUrNph4hSFQIFpoKSJ1LJ1LXzac
> sd96ItGA8I0&e= Summary : Core Services Apache Jakarta Servlet/JSP 
> server Description : Servlet container for developing Web applications 
> in Java.
> Used as basis for the
> Reference Implementation of the Servlet and JSP specificiations. This 
> RPM mirrors the layout used by official Tomcat distributions on all 
> other OSes and linux variants. If you want a FHS-based package - be 
> warned that tomcat may not work very well. (TODO: add more warnings 
> !). If you still want FHS-based package - please use jpackage.org or 
> an RPM that is using the same exact layout.
>
> Can you please help on this.
>
> Regards,
> Radhika
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to