在Apache配置中,“每个孩子的最大连接数"的建议最大值是多少? [英] What is the recommended max value for Max Connections Per Child in Apache configuration?

查看:434
本文介绍了在Apache配置中,“每个孩子的最大连接数"的建议最大值是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在托盘上以减少服务器上Apache的内存使用.

I am traying to reduce memory usage by Apache on the server.

我每个孩子的实际最大连接数为10k

My actual Max Connections Per Child is 10k

根据以下建议

每个孩子的最大连接数应减少到1000

the Max Connections Per Child should be reduced to 1000

在Apache配置中,每个孩子的最大连接数"的建议最大值是多少?

What is the recommended max value for Max Connections Per Child in Apache configuration?

推荐答案

此指令唯一影响任何事情的时间是Apache工人正在泄漏内存.发生这种情况的一种方式是分配内存(通过malloc()或其他方式)并且从不释放内存.这是Apache或其模块中的设计/实现缺陷的结果.

The only time when this directive affects anything is when your Apache workers are leaking memory. One way this happens is that memory is allocated (via malloc() or whatever) and never freed. It's the result of design/implementation flaws in Apache or its modules.

该指令的确有点不合时宜-但是,如果Apache中加载了某些模块,例如每个请求泄漏8个字节,那么在发出大量请求之后,您将耗尽内存.因此,快速解决方案是仅终止每个MaxConnectionsPerChild请求的进程,然后开始一个新的请求.

This directive is somewhat of a hack, really -- but if there's some module that's loaded into Apache that leaks, say, 8 bytes every request, then after a lot of requests, you'll run out of memory. So the quick fix is to just kill the process every MaxConnectionsPerChild requests and start a new one.

仅当将MaxConnectionsPerChild设置为零时,它在许多请求的范围内逐渐增加时,才会影响您的内存使用.

This will only affect your memory usage if you see it gradually increase over the span of lots of requests when setting MaxConnectionsPerChild to zero.

这篇关于在Apache配置中,“每个孩子的最大连接数"的建议最大值是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆