On Thu, Feb 26, 2026 at 7:02 PM Tatsuki Makino <[email protected]> wrote:
> Hello. > Sorry for cutting in from the side. > > On 2026/02/25 23:48, Frank Gingras wrote: > > The solution is really to use the event mpm here - why are you bound to > use > > the prefork approach? > When combined with PHP and the like, it sometimes causes unexpected > terminations, doesn't it? > It still seems to be unresolved, and the cause is unknown. > It seems wise to set it to voluntarily shut down and restart after > handling a certain number of requests. > Prefork is what performs that for each request individually :) > > Regards. > > Mixing httpd with the mod_php DSO is really not the best way to deploy a server. What you want instead is to use a threaded mpm like event, and proxy to pools of php-fpm processes using proxy_fcgi. This allows for a very large number of httpd workers, and a relatively limited number of fpm processes. Then, you can apply caching as needed to prevent requests from tying up fpm workers for too long, and over-spawning heavy processes. Back then when using prefork and mod_php, memory leaks did indeed occur over time, so restarting the workers was needed. This is really no longer a major concern.
