AEM 6.1 SP1 - Unable to create new native thread cause java.lang.OutOfMemoryError on Mac

aminel52878202

30-01-2019

Hello,

Knowing that I have enough memory on CQ_JVM_OPTS . I cannot start my aem local instance on Mac cause  :

*ERROR* [FelixDispatchQueue] ERROR: Error calling StartupListener com.adobe.granite.maintenance.impl.TaskScheduler@6865d6b6 (java.lang.OutOfMemoryError: unable to create new native thread)

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 com.adobe.granite.maintenance.impl.TaskScheduler.start(TaskScheduler.java:206)

I launch aem via crx-quickstart.

I welcome any suggestion you would care to make on this matter.

Many thanks in advance,

Accepted Solutions (0)

Answers (7)

Answers (7)

aminel52878202

30-01-2019

Hello,

Yes :

ulimit - a

core file size          (blocks, -c) 0

data seg size           (kbytes, -d) unlimited

file size               (blocks, -f) unlimited

max locked memory       (kbytes, -l) unlimited

max memory size         (kbytes, -m) unlimited

open files                      (-n) 256

pipe size            (512 bytes, -p) 1

stack size              (kbytes, -s) 8192

cpu time               (seconds, -t) unlimited

max user processes              (-u) 1418

virtual memory          (kbytes, -v) unlimited

sysctl kern.num_threads

kern.num_threads: 20480

I also suspect a OS issue.

Thanks,

Gaurav-Behl

MVP

30-01-2019

Could you share the output of:

ulimit -a  // it should show the number of resources available

and

sysctl kern.num_threads  // to show the max threads available by OS

There must be a way to disable the TaskScheduler at boot, that would bring up the server and then take thread dumps to find more clues.

aminel52878202

30-01-2019

I use java version 1.8.0

Please take a look on my CQ_JVM_OPTS='-server -Xmx2048m -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError  -XX:+UseConcMarkSweepGC  -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n'

aminel52878202

30-01-2019

Thank you for your reply,

I have checked documentations and this page many times without success.

Please take a look on my CQ_JVM_OPTS='-server -Xmx2048m -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError  -XX:+UseConcMarkSweepGC  -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n'

Thanks,

berliant

Employee

30-01-2019

What version of JDK do you use, i.e. what is an output of java -version?

OOTB options are set to: CQ_JVM_OPTS='-server -Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true'

How did you modify it?