Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/mongodb] warns of vm.max_map_count and sysfsFile #32472

Open
wilburfs opened this issue Mar 16, 2025 · 8 comments
Open

[bitnami/mongodb] warns of vm.max_map_count and sysfsFile #32472

wilburfs opened this issue Mar 16, 2025 · 8 comments
Assignees
Labels
mongodb tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@wilburfs
Copy link

wilburfs commented Mar 16, 2025

Name and Version

bitnami/mongodb

What architecture are you using?

None

What steps will reproduce the bug?

mongosh connect to db

Are you using any custom parameters or values?

No response

What is the expected behavior?

No response

What do you see instead?

When I connect using mongosh, the db gives the following warning. Should I modify the corresponding configuration on the host machine or inside the pod?

-----------------------------
The server generated these startup warnings when booting
   2025-03-16T21:01:46.529+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
   2025-03-16T21:01:46.529+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
   2025-03-16T21:01:46.529+00:00: We suggest setting the contents of sysfsFile to 0.
   2025-03-16T21:01:46.529+00:00: vm.max_map_count is too low

Additional information

No response

@wilburfs wilburfs added the tech-issues The user has a technical issue about an application label Mar 16, 2025
@github-actions github-actions bot added the triage Triage is needed label Mar 16, 2025
@javsalgar javsalgar changed the title warns of vm.max_map_count and sysfsFile [bitnami/mongodb] warns of vm.max_map_count and sysfsFile Mar 17, 2025
@javsalgar
Copy link
Contributor

Hi,

This kind of kernel settings should be done in the host running kubernetes.

@wilburfs
Copy link
Author

wilburfs commented Mar 17, 2025

@javsalgar hello javsalgar,
I set the env on the pod host : echo $GLIBC_TUNABLES to be glibc.pthread.rseq=0
and cat /etc/sysctl.conf to be :

 _net.core.somaxconn = 4096
....
kernel.printk = 5
vm.max_map_count=262144_

then ,restart the pod, the warn shown again :

 _2025-03-17T10:04:38.630+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
   2025-03-17T10:04:38.630+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
   2025-03-17T10:04:38.630+00:00: We suggest setting the contents of sysfsFile to 0.
   2025-03-17T10:04:38.630+00:00: vm.max_map_count is too low_

@javsalgar
Copy link
Contributor

Hi,

This /etc/sysctl.conf is in the host, right? Did you verify that the sysctl command is aplying the updated settings?

sysctl -p /etc/sysctl.conf

@wilburfs
Copy link
Author

wilburfs commented Mar 18, 2025

@javsalgar hello,
yes,
sysctl -p /etc/sysctl.conf
net.core.somaxconn = 4096
net.ipv4.tcp_max_tw_buckets = 4096
net.ipv4.tcp_slow_start_after_idle = 0
kernel.sysrq = 1
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
kernel.printk = 5
vm.max_map_count = 262144

and then restart the statefulSet,mongosh, still show the warns:
The server generated these startup warnings when booting
2025-03-18T17:00:03.971+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
2025-03-18T17:00:03.971+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
2025-03-18T17:00:03.971+00:00: We suggest setting the contents of sysfsFile to 0.
2025-03-18T17:00:03.971+00:00: vm.max_map_count is too low

@javsalgar
Copy link
Contributor

This is strange, could you enter the container and run

sysctl -a

@wilburfs
Copy link
Author

@javsalgar yes, enter the pod, sysctl -a :

debug.exception-trace = 1
debug.kprobes-optimization = 1
dev.cdrom.autoclose = 1
dev.cdrom.autoeject = 0
.....
dev.cdrom.info = Can play audio: 1
vm.max_map_count = 262144

but the warn still shown:

The server generated these startup warnings when booting
2025-03-18T17:00:03.971+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
2025-03-18T17:00:03.971+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
2025-03-18T17:00:03.971+00:00: We suggest setting the contents of sysfsFile to 0.
2025-03-18T17:00:03.971+00:00: vm.max_map_count is too low

@javsalgar
Copy link
Contributor

Hi,

If the value is set (as you showed using the output of sysctl -a), then I'd say it's a problem with how mongosh is detecting the resources, not with the Bitnami packaging of MongoDB. My advice would be to report it to the mongodb devs so they can check what's missing.

@wilburfs
Copy link
Author

@javsalgar Thank you , I will do as your suggession as update to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mongodb tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants