change php/apache configuration to php-fpm

arash

Verified User
Joined
Aug 1, 2021
Messages
5
Hello,

I'm dealing with some errors in a server that has directadmin installed in it.
I found "mmap() failed: [12] Cannot allocate memory" and "[Sun Aug 01 10:37:42.665427 2021] [core:notice] [pid 998] AH00052: child pid 6102 exit signal Segmentation fault (11)" in the apache error log, I investigate this and i think its related to using mpm_prefork_module and php7_module in apache, now i want to change php/apache settings to use php-fpm to solve this problem, my question is can i do it manually ? I mean can i use this tutorial https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM in apache website to do that ? is it ok ?
or there is a better way to do that via directmin control panel and settings ?
 
I wouldn't use external wiki's or manual's if you're not sure what you're doing.

How did you enable mpm_prefork? Because by default Directadmin uses mpm_event and then you would not have this problem.
Did you already change things custom in files which you found in wiki's or on the internet?

In panels, it's mostly best to only use the panel or panel docs unless you specifically know what you are doing and are not only copying and pasting docs or wiki's. ;)

I don't know how your options.conf looks like now for php, so maybe you can best tell us first which php mode you are using, and if you're using mod_ruid2 or suexec or something.

It's fairly easy to change to php-fpm, for example like below. But if you use mod_ruid2 at this moment, you need to disable it in options.conf when you change to php-fpm.
 
Back
Top