Sometimes our clients have come across the issue that their website was causing 500 Internal Server error while loading the PHP pages. On investigating further we had found that the error log was saying the error below
/usr/bin/php: error while loading shared libraries: libpthread.so.0: failed to map segment from shared object: Cannot allocate memory
Our further Investigation led the issue to be RLimitMem directive enabled by the client being too low. The Rlimit directives are used to limit the amount of resource which can be used by processes forked off from the httpd children. RLimit directives of apache often give a false feeling of limiting the user resources.
Commenting out RLimitMem value solved the issue. If that also didn’t fix the issue, check out for the limit settings in /etc/security/limits.conf
I hope this helps a bit sometime in the future for my fellow SAGEs