Try using the -Djava.io.tmpdir= option to select an alternate temp location

Hi,

I notice some of my elasticsearch containers do cyclic restarts after long service.
docker logs show the following:
Version:1.0 StartHTML:0000000105 EndHTML:0000039235 StartFragment:0000037910 EndFragment:0000039195

OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:

   19

Try using the -Djava.io.tmpdir= option to select an alternate temp location.

OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:

   1

Try using the -Djava.io.tmpdir= option to select an alternate temp location.

After this I have disabled java performance monitoring and changed location of tmp dir but I still see that hsperfdata directories are created under systems tmp directory.

bash-4.3# tree /tmp
/tmp
├── hsperfdata_elasticsearch
└── hsperfdata_root

2 directories, 0 files

One directory is created in new tmp dir:

bash-4.3# tree /elasticsearch/tmp/
/elasticsearch/tmp/
└── jna--1985354563

java is started with right options I believe:

bash-4.3# ps aux | grep java
1 elastics 2:10 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -Xms6g -Xmx6g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -XX:-UsePerfData -Djava.io.tmpdir=/elasticsearch/tmp -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch

Are there anything I can do about the hsperf directories under /tmp?

Kinds Regards
Mathias

hey mathias,

I wonder if this post can help Is hsperfdata file critical?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.