openjdk-docker icon indicating copy to clipboard operation
openjdk-docker copied to clipboard

Problem with vm.max_map_count": Read-only file system

Open hitokiri opened this issue 5 years ago • 1 comments

Hello, trying to resolve a problem with the memory assigned to JDK, when you try to change the variable with the command sysctl the system returns this message sysctl: setting key "vm.max_map_count": Read-only file system

I Don't can resolve this problem, help me please, I have tried many forms

sysctl -w vm.max_map_count=262144

I use AMR64, which is a Raspberry 4

hitokiri avatar Jan 24 '21 03:01 hitokiri

I'm not sure if it's the problem with openjdk-docker images, the setting your are trying will be changing the file /proc/sys/vm/max_map_count which is procfs, I feel docker mounts procfs as the read-only file system.

It cannot be set with --sysctl option of docker as it is a node-level sysctl.

Possible workarounds I can think of are [Just listing them but not recommended]:

  • Remounting procfs with read-write access by running container with --privileged
  • Setting vm.max_map_count on host as it gets reflected in the containers as well

bharathappali avatar Jan 28 '21 19:01 bharathappali