我已经通过AWS Elastic Beanstalk – Apache正在不断重启 我们的弹性beanstalk实例在error_log中报告以下消息 [Mon Jun 26 22:01:01.878892 2017] [mpm_prefork:notice] [pid 8595] AH00173: SIGHUP received. Attempting to restart *** Error in (wsgi:wsgi) ': double free or corruption (out): 0x00007f564cced560 *** 有时错误序列看起来更像这样: [Tue Jun 27 00:01:01.215260 2017] [:error] [pid 6429] [remote XX.XXX.XX.195:29773] mod_wsgi (pid=6429): Exception occurred processing WSGI script '/opt/python/current/app/site/settings/wsgi/__init__.py'. [Tue Jun 27 00:01:01.215320 […]
背景:在ELB后面有六个networking服务器,每个networking服务器运行两个虚拟主机站点。 我的httpd.conf文件没有configuration为prefork MPM或工人MPM或事件MPM。 我试过了:我检查了下面的path,发现prefork mpmpath的默认configuration:usr / share / doc / httpd24-2.4.23 / httpd-mpm.conf # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxRequestWorkers: maximum number of server processes allowed to […]
我被告知切换到nginx或至less到mpm_worker。 但是,真的,我怎么估计,如果我的服务器是不是真的超载,即使使用mpm_prefork? 我的系统是: GCP 1 CPU + 3,75GB Debian 8 Apache 2.4与mpm_prefork 清漆caching,Memcache 一些php.ini设置 max_execution_time = 30 max_input_time = 60 memory_limit = 1536M 一些其他各种标准的apache模块,没有fastcgi和没有php-fpm。 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 250 MaxConnectionsPerChild 0 </IfModule> KeepAlive Off 我有大约20个小WordPress的博客。 那么,我可以在所有网站上共同使用多less个并发用户? 我不需要确切的数字。 我想知道是十几岁还是十几岁? 可能不是10000s。 但是,如果在线时间相当于250次 – 我认为现在还是很好的。 另外,我应该将内存限制设置为3GB? 或者让左边的2GB被清漆使用是个好主意? Completed 1000 requests Finished 1000 requests […]
我正在运行一个网站,在特定的时间得到大量使用。 我在EC2 Ubuntu 16.04服务器上运行apache 2.4,使用4核CPU和16GB内存和2GB交换。 平均apache进程的大小是35MB(大约)。 我将KeepAlive值设置为ON,并将KeepAliveTimeout设置为5的较低值。 我正在使用MPM prefork,configuration如下所示: <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 350 MaxRequestWorkers 350 MaxConnectionsPerChild 20000 </IfModule> 当并发用户数量增加时,htop显示所有4个内核都被100%利用,但是在可用的15GB中RAM仍然只显示1.5或2GB。 为什么没有使用更多的内存? 有这种CPU使用情况是正常的吗? 如果用户数从这里增加,则服务器开始返回HTTP 522错误。 附加信息:用于获取值的计算参考本教程和ServerFault上的这个答案 我发现一个单一的Apache进程占用大约35MB的内存。 我在PM2下运行nodejs(for socketio)。 MySQL从RDS运行,不在此服务器上。 尽pipe如此,根据build议的计算,我已经减less了一些值: Available Memory – 14000MB (将其余的RAM留作其他用途) Apache Process usage – 40MB MaxRequestWorkers = 14000/40 = 350 StartServers 30% of MaxRequestWorkers (应该是105,但是我觉得太高了,应该把它做成105?) […]
我如何select使用哪个Apache MPM? 谈论不同MPM的优缺点。 这个问题是:如何告诉Apache 2.4哪个MPM使用?
我很新configurationApache。 有大量的教程,但很less全面的如何做一些事情。 我想知道的是: 我如何更改哪个MPMconfiguration文件被用于我的Apache? 我如何计算apache2.conf中客户端和连接的最佳数量,这个服务器主要用于多个CMS系统,如WordPress等,包括caching? 我使用的服务器是:XEON E3-1230(4 x 3.2 GHz)和16 GB DDR3 EEC。 我希望进一步的描述是无关紧要的。 这是我在/etc/apache2/apache2.conf # prefork MPM <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # worker MPM <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # event MPM <IfModule […]
(我已经意识到工人和事件,他们如何不同于prefork,这是一个prefork唯一的问题) 第一个问题: 这个页面上的“请求”是什么意思? http://httpd.apache.org/docs/2.4/mod/prefork.html “ Apache httpd总是试图维护几个备用或空闲的服务器进程,这些服务器进程已经准备好为接收到的请求提供服务。 传入的HTTP请求? 传入的TCP连接? 第二个问题: 这是否意味着,如果我打开一个网站,其中包含5个图像,需要5个Apache进程,因此5个PHP图像(假设mod_php是打开的)? 谢谢
我遇到了这个Apacheconfiguration: <IfModule mpm_prefork_module> StartServers 16 MinSpareServers 16 MaxSpareServers 32 ServerLimit 400 MaxClients 400 MaxRequestsPerChild 10000 </IfModule> <IfModule mpm_worker_module> StartServers 4 MaxClients 1024 MinSpareThreads 64 MaxSpareThreads 192 ThreadsPerChild 64 MaxRequestsPerChild 0 </IfModule> 目前,只安装了mpm_prefork_module。 但是如果mpm_worker_module安装在服务器上会发生什么? 这种configuration令我担心。 这个问题是相似的,但答案只是说如何find当前使用的MPM,而不是标准的行为是什么,或者如果行为是未定义的。
我有一个运行Apache/2.4.7的Ubuntu 14.04.4 LTS服务器,我的error.log文件经常会在下面得到这样的消息: [Thu Sep 01 19:45:40.571637 2016] [mpm_prefork:info] [pid 1696] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 3 idle, and 17 total children [Thu Sep 01 19:47:03.699939 2016] [mpm_prefork:info] [pid 1696] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning […]
我使用apache2-mpm-itk来运行我的Web应用程序之一,用于自定义uid和gid,这两者都是出于审计和安全原因。 这很好,但是我不确定这个用户需要什么样的特权。 我目前正在做一些像useradd mywebapp -U -d/tmp -c"Custom webapp User"但创build了一个普通的用户。 所以首先一个新手问题:我如何添加一个“系统”用户,可以不能用于例如ssh'in或不出现在Ubuntu桌面上的login屏幕? 我需要给这个用户什么样的特权? 例如,我假设www-data可以写入Apache日志文件,所以它需要比普通用户更多的东西。 但同时,我不想给它更多的权限运行我的web应用程序,绝对不是根。