Symptoms

Website throws error 500 when browsing.

Error log contains the messages:

[Sun Aug 06 12:08:14 2017] [error] [client 203.0.113.2] sw-engine-cgi: error while loading shared libraries: libaudit.so.0: failed to map segment from shared object: Cannot allocate memory
[Sun Aug 06 12:08:14 2017] [error] [client 203.0.113.2] Premature end of script headers: sw-engine-cgi
[Sun Aug 06 12:08:21 2017] [info] [client 203.0.113.2] Connection to child 5 established (server wpb.server.com:443)
[Sun Aug 06 12:08:21 2017] [info] Seeding PRNG with 0 bytes of entropy
[Sun Aug 06 12:08:21 2017] [info] Initial (No.1) HTTPS request received for child 5 (server wpb.server.com:443)
[Sun Aug 06 12:08:21 2017] [error] [client 203.0.113.2] sw-engine-cgi: error while loading shared libraries: libaudit.so.0: failed to map segment from shared object: Cannot allocate memory, referer: https://cp.cleverspeed.com/servlet/Turbine/p2URI?servlet=Turbine&bw_id=c90ddbefd19ecd660e271d9dbcd704ab&action=aps.EntryPointRedirectScreenHandler&hashcode=b43a9757
[Sun Aug 06 12:08:21 2017] [error] [client 203.0.113.2] Premature end of script headers: sw-engine-cgi, referer: https://cp.cleverspeed.com/servlet/Turbine/p2URI?servlet=Turbine&bw_id=c90ddbefd19ecd660e271d9dbcd704ab&action=aps.EntryPointRedirectScreenHandler&hashcode=b43a9757
[Sun Aug 06 12:08:21 2017] [info] [client 203.0.113.2] Connection closed to child 5 with standard shutdown (server wpb.server.com:443)

Cause

Virtual Host configuration does not allow allocating memory for apache process to load the necessary dynamic libraries.

Resolution

The amount of memory that Apache child processes will consume is defined in RLimitMEM' directive in website configuration file /usr/local/pem/vhosts/<wbspc_nmbr>/webspace/conf/vhost.conf (or /var/www/vhosts/<wbspc_nmbr>/webspace/conf/vhost.conf). To fix the error:

  1. Edit the file of affected webspace, having increased the amount of memory.
  2. Reload the apache configuration:

    /etc/init.d/pemhttpd reload
    

    or

    /etc/init.d/httpd reload
    

Internal content

Link on internal Article