Redhat Dovecot error while loading shared libraries: failed to map segment from shared object: Cannot allocate memory

If you have recently updated your Red Hat Enterprise Linux Server release 5.1 (Tikanga) / CentOS 5.1, dovecot imap server might give out the following error:

Nov 5 13:21:13 p5ora1 dovecot: imap-login: imap-login: error while loading shared libraries: failed to map segment from shared object: Cannot allocate memory
Nov 5 13:21:13 p5ora1 dovecot: pop3-login: pop3-login: error while loading shared libraries: failed to map segment from shared object: Cannot allocate memory

This error is not related to shared libraries. You need to set maximum process size in megabytes. If you don’t use login_process_per_connection you might need to grow this. Just open /etc/dovecot.conf file
# vi /etc/dovecot.conf
Find line read as follows:
Uncomment and set it to 64:
login_process_size = 64
Save and close the file. Restart dovecot imap server:
# /etc/init.d/dovecot restart

The Dovecot package on x86_64 (64 bit system) kernels requires the parameter “login_process_size = 64” to be added to /etc/dovecot.conf after an upgrade to RHEL / CentOS 5.1.

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
28 comments… add one
  • Jean-Francois D. [iWeb] Jun 12, 2009 @ 21:57

    Thank you very much, it does work.

  • Kapila Jul 1, 2008 @ 3:37

    getting error is :
    [root@localhost linux-i386]# ./commsconfig
    ./commsconfig: error while loading shared libraries: cannot open shared object file: No such file or directory

    some my infomation of os
    [root@localhost ~]# uname -a
    Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux

    [root@localhost ~]# rpm -qa |grep libstdc

    I did your steps but broble still there
    my comment, this problem I can’t see in fedora 8.
    please help me
    best regards


  • Jim OBrien Jun 20, 2008 @ 6:24

    Using ispconfig in a virtuozzo linux redhat/centos environment 64 bit. Glad I stumbled across this posting saved me alot of time. Thank you!

  • Adam Jun 12, 2008 @ 18:49

    Thanks. Anyone know why this was needed though? What specifically was the change that required more memory for dovecot?

  • Christopher Murtagh Jun 8, 2008 @ 4:59

    Awesome! Thanks so much for posting this, definitely made my day otherwise I would have been banging against SELinux trying to figure what voodoo needed.

  • arthur Jun 7, 2008 @ 13:01

    wow – thanks! that saved me heaps of time!!!

  • redhot May 27, 2008 @ 20:22

    Thanks! This was just a great troubleshoot!

  • Sander May 2, 2008 @ 7:41

    Thanks, this was a very easy and fast fix. You’re the first hit on Google!

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.