I'm getting mmap failed messages in syslog on version 1.2.15 for dovecot.index.cache files. This old dovecot version is installed with debian packages. The OS and all software is 64-bit.
I've found info on this log message, with a suggested fix of raising vsz_limit ... but this seems to be a config option for dovecot 2.x, not 1.x.
The file it complains about being unable to mmap is only 90MB, and the biggest cache file I have found on the system is only 180MB. The system has 4GB of total memory with about 1GB of that allocated to OS disk cache right now. The mmap functionality provided by the OS doesn't use *actual* memory, so the amount of memory I have should be irrelevant.
Checking 'ulimit -a' with several users shows that vmemory is unlimited for all of them.
How do I go about allowing docevot 1.x to use more virtual memory? I do have a migration planned to Ubuntu 16, where I can run a 2.x version, but that's not going to happen for a while.
Thanks, Shawn
On 4/14/2018 8:36 AM, Shawn Heisey wrote:
I'm getting mmap failed messages in syslog on version 1.2.15 for dovecot.index.cache files. This old dovecot version is installed with debian packages. The OS and all software is 64-bit.
I've found info on this log message, with a suggested fix of raising vsz_limit ... but this seems to be a config option for dovecot 2.x, not 1.x.
The file it complains about being unable to mmap is only 90MB, and the biggest cache file I have found on the system is only 180MB. The system has 4GB of total memory with about 1GB of that allocated to OS disk cache right now. The mmap functionality provided by the OS doesn't use *actual* memory, so the amount of memory I have should be irrelevant.
Checking 'ulimit -a' with several users shows that vmemory is unlimited for all of them.
How do I go about allowing docevot 1.x to use more virtual memory? I do have a migration planned to Ubuntu 16, where I can run a 2.x version, but that's not going to happen for a while.
It's been about three weeks since I asked this question. All the information I have available says that all users have no limits on virtual memory, so it must be dovecot itself that sets the limit. Can that be changed in the 1.2 version? I can't upgrade to 2.x yet.
Here's an actual syslog entry, redacted to remove identifying info:
May 9 21:55:48 frodo dovecot: IMAP(REDACTED1): mmap() failed with index cache file /home/vmail/REDACTED2/dovecot.index.cache: Cannot allocate memory
The file that it could not mmap here is 189843456 bytes.
Thanks, Shawn
On 5/9/2018 10:15 PM, Shawn Heisey wrote:
It's been about three weeks since I asked this question. All the information I have available says that all users have no limits on virtual memory, so it must be dovecot itself that sets the limit. Can that be changed in the 1.2 version? I can't upgrade to 2.x yet.
Here's an actual syslog entry, redacted to remove identifying info:
May 9 21:55:48 frodo dovecot: IMAP(REDACTED1): mmap() failed with index cache file /home/vmail/REDACTED2/dovecot.index.cache: Cannot allocate memory
The file that it could not mmap here is 189843456 bytes.
I may have figured it out. After a little googling to see how virtual memory limits are set in C programs, and then some grepping of the 1.2.15 dovecot source, I saw evidence that setting the mail_process_size value in dovecot.conf can increase the limit on virtual memory. I have done this, and will keep an eye on the log to see if it helps.
Thanks, Shawn
On 10 May 2018 at 07:52 Shawn Heisey <elyograg@elyograg.org> wrote:
On 5/9/2018 10:15 PM, Shawn Heisey wrote:
It's been about three weeks since I asked this question. All the information I have available says that all users have no limits on virtual memory, so it must be dovecot itself that sets the limit. Can that be changed in the 1.2 version? I can't upgrade to 2.x yet.
Here's an actual syslog entry, redacted to remove identifying info:
May 9 21:55:48 frodo dovecot: IMAP(REDACTED1): mmap() failed with index cache file /home/vmail/REDACTED2/dovecot.index.cache: Cannot allocate memory
The file that it could not mmap here is 189843456 bytes.
I may have figured it out. After a little googling to see how virtual memory limits are set in C programs, and then some grepping of the 1.2.15 dovecot source, I saw evidence that setting the mail_process_size value in dovecot.conf can increase the limit on virtual memory. I have done this, and will keep an eye on the log to see if it helps.
Thanks, Shawn
Hi Shawn, you've figured it out correctly. If you can spare the memory, you should probably up the default vsize limit to something like 1G.
Aki
participants (2)
-
Aki Tuomi
-
Shawn Heisey