How to set the number of php processes

王林
Release: 2023-03-01 07:18:01
Original
4580 people have browsed it

How to set the number of php processes

Just add the following configuration to the php-fpm.conf configuration file:

pm.max_children = 100 #,子进程最大数 pm.start_servers = 30 #,启动时的进程数 pm.min_spare_servers = 20 #,保证空闲进程数最小值,如果空闲进程小于此值,则创建新的子进程 pm.max_spare_servers = 100 #,保证空闲进程数最大值,如果空闲进程大于此值,此进行清理 pm.max_requests = 500 #设置每个子进程重生之前服务的请求数. 对于可能存在内存泄漏的第三方模块来说是非常有用的. 如果设置为 ’0′ 则一直接受请求. 等同于 PHP_FCGI_MAX_REQUESTS 环境变量. 默认值: 0.
Copy after login

Please pay attention tophp Chinese websitefor more related tutorials.

The above is the detailed content of How to set the number of php processes. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!