windows下Apache内存耗尽和内存溢出假死现象

[ 2020-06-02 11:26:15 | 作者: admin ]
字号: | |
首先打开 Apache 的配置文件 httpd.conf 这个文件, 找到这句:“#Include etc/extra/httpd-mpm.conf” , 将前面的 "#" 号去掉

1、在 Apache 的 conf/extra/httpd-mpm.conf 文件下配置
<IfModule mpm_winnt_module>
         ThreadsPerChild 500
         ThreadLimit 500
         MaxRequestsPerChild 10000
</IfModule>

对应的配置参数作用如下:
首先这个值是针对apache的,不是fastcgi
ThreadsPerChild 每个子进程的最大并发线程数。
MaxRequestsPerChild 每个子进程允许处理的请求总数。如果累计处理的请求数超过该值,该子进程将会结束(然后根据需要确定是否创建新的子进程),该值设为0表示不限制请求总数(子进程永不结束)。

2、在 httpd.conf 下添加
AcceptFilter http none
AcceptFilter https none
EnableSendfile Off
EnableMMAP off
 

参考:
http://www.asymt.com/servers/windows/350.html
http://unixboy.iteye.com/blog/702040
https://www.linyufan.com/content-10-180-1.html
APACHE 过段时间就内存溢出的处理办法? https://www.oschina.net/question/108028_14902
Apache优化:修改最大并发连接数(ThreadsPerChild的值) https://www.cnblogs.com/xxj-bigshow/p/7095009.html
[最后修改由 admin, 于 2020-06-06 09:07:16]
评论Feed 评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=2678

这篇日志没有评论。

此日志不可发表评论。