Skip to content

"<jemalloc>: Error in munmap(): Cannot allocate memory" #3516

@danielmewes

Description

@danielmewes

I have a cluster of four servers based on next.
I created 400 tables in the test database, and then ran
r.db('test').reconfigure({shards: 8, replicas: 4})

Two things happened:

  • One of the servers started using a lot of memory. According to htop, it used in the range of 20 GB, with >40 GB virtual memory allocated to that process. I think this part is ok, though at some point we might want to look into it (and maybe throttle the query or something).
  • The server started printing lots of these messages: <jemalloc>: Error in munmap(): Cannot allocate memory. It kept running though and everything still seems to be fine after the reconfiguration has finished.

Three questions:

  • What does this message mean exactly?
  • If an allocation failed, why is the server not crashing? Is jemalloc internally recovering from it somehow?
  • If this is just a sort of warning without any consequences, can we suppress it?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions