Skip to content

OutOfMemoryError: unable to create new native thread in Hybris 6.7 #304

@rdunna-eprosoft

Description

@rdunna-eprosoft

I'm working on Hybris 6.7 with system configuration of 8 CPU cores and 32GB RAM.

Following are the local.properties configured for "DCEVM-8u181-installer-build2.jar", "hotswap-agent-1.3.0.jar" and java version "1.8.0_211"

java.mem=6G
tomcat.maxthreads=200
tomcat.acceptcount=100
tomcat.debugjavaoptions=-Xms6g -Xmx6g -Xss256k -XXaltjvm=dcevm -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n -javaagent:/DCEVM/hotswap-agent-1.3.0.jar=autoHotswap=true,disablePlugin=Log4j2,disablePlugin=Spring,disablePlugin=Proxy,disablePlugin=AnonymousClassPatch,disablePlugin=ZK
tomcat.generaloptions=-Xmx6G ...

Hotswap stops working after I do ant build in any extension

Exception in thread "Thread-3" java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:717)
at org.hotswap.agent.command.impl.SchedulerImpl.executeCommand(SchedulerImpl.java:119)
at org.hotswap.agent.command.impl.SchedulerImpl.processCommands(SchedulerImpl.java:92)
at org.hotswap.agent.command.impl.SchedulerImpl.access$100(SchedulerImpl.java:21)
at org.hotswap.agent.command.impl.SchedulerImpl$2.run(SchedulerImpl.java:128)
...

More Info:

ulimit -a

core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 128561
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 4096
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

cat /proc/sys/kernel/threads-max

257122

java -XX:+PrintFlagsFinal -version | grep ThreadStackSize

intx CompilerThreadStackSize = 0 {pd product}
intx ThreadStackSize = 1024 {pd product}
intx VMThreadStackSize = 1024 {pd product}

sysctl -a | grep kernel.pid_max

kernel.pid_max = 32768

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions