我们有一个服务器上运行的几个网站。 (CentOS,Hostgator“精英”)一些网站相当大,我们的主要网站足够大,谷歌索引> 100万页。 我抱怨HG(我有一个托pipe的专用服务器)关于一些图像不加载,即使他们在服务器上。 刷新页面通常会允许加载这些图像。 这并不总是相同的图像失败,这是有点随意的。 我在这个服务器上至less有3个我们的网站上看到过这种情况。 他们build议我将MPM模块更改为prefork,因为它处理内存有点不同 我在网上find了build议,帮助我确定我的服务器当前正在运行worker.c。 一些图像通过一个php脚本来发送一个jpg头文件,然后执行readfile($filename); 为这些图像提供服务,但这不仅仅是我看过这个问题的图像。 build议转换为prefork一个好主意? 这可能有助于解决我遇到的问题吗?
我有麻烦与我的Apacheconfiguration。 现在nginx作为一个反向代理坐在前面的Apache,提供静态资产,然后传递PHP请求到Apache。 Apache正在使用mod_php。 我们确实有用户,但网站正在慢慢增长,所以我知道一个事实Mysql不是这里的罪魁祸首。 该网站不是数据库重,它是Web服务重。 该网站正在慢慢增长,我们将在这个月内处理大约43万个独立用户,每次可以有80-230个人在其上,但每秒请求数不会超过8个。 Apache似乎持有内存,大约一个星期后导致服务器崩溃,并需要重新启动。 服务器是一个linode 8核心,8 GB的Ubuntu 12.04机器。 这是当前configuration我们现在使用Prefork模块: Timeout 15 KeepAlive Off MaxKeepAliveRequests 1000 KeepAliveTimeout 5 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 256 MaxRequestsPerChild 500 </IfModule> HostnameLookups Off 如果您需要更多信息,请告诉我。 我们会从prefork模块中获得更less的内存使用和更好的性能吗?
CentOS 7,Apache 2.4,FPM / FastCGI,MariaDB 我的512M VPS正在消耗一个开发WordPress站点的内存,所以我希望这会导致我更好的调整path; 如果没有,请通知。 我试图从MPM工作者切换到MPM事件,但在Apache重新启动时收到以下错误: AH00526: Syntax error on line 31 of /etc/httpd/conf.d/php.conf: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration /etc/httpd/conf.modules.d/00-mpm.conf # Select the MPM module which should be used by uncommenting exactly # one of the following LoadModule lines: # prefork […]
有一个Apache服务器版本(Apache / 2.2.13),我想使用MPM模块但我不知道什么使用prefork或工人,我需要什么样的configuration? 规范: 拉姆:4G CPU:Intel(R)Xeon(R)CPU E5405 @ 2.00GHz grep -c处理器/ proc / cpuinfo 8 最大每个Apache进程的大小:23M
我在同一个Linux服务器(AWS EC2实例)上托pipe不同的站点,我想通过虚拟主机特定的configuration为这些站点提供不同的限制。 这可能吗?
您好我试图从prefork切换到Apache MPM事件如下: vim /etc/httpd/conf.modules.d/00-mpm.conf # Select the MPM module which should be used by uncommenting exactly # one of the following LoadModule lines: # prefork MPM: Implements a non-threaded, pre-forking web server # See: http://httpd.apache.org/docs/2.4/mod/prefork.html LoadModule mpm_prefork_module modules/mod_mpm_prefork.so # worker MPM: Multi-Processing Module implementing a hybrid # multi-threaded multi-process web server # See: http://httpd.apache.org/docs/2.4/mod/worker.html # […]
提前道歉,如果这是一个愚蠢的问题,我是新来的这一切! 我prefork安装在我确认通过运行的Ubuntu服务器上 aptitude search apache2-mpm- 哪给了我 p apache2-mpm-event – Apache HTTP Server – event driven model p apache2-mpm-itk – multiuser MPM for Apache 2.2 i A apache2-mpm-prefork – Apache HTTP Server – traditional non-threaded model p apache2-mpm-worker – Apache HTTP Server – high speed threaded model root@redflagwiki:/etc/apache2/sites-enabled# vi /etc/apache2/apache2.conf root@redflagwiki:/etc/apache2/sites-enabled# aptitude search apache2-mpm- p apache2-mpm-event […]
我想我有问题设置Apache24正确。 Apache似乎占用了很多内存,我不知道如何configuration它。 FreeBSD服务器使用了50%的交换空间。 我们正在使用2Gb RAM的FreeBSD VPS上运行带有MySQL 5.6的Magento。 服务器每天只有大约500位独立访问者。 我的知识是有限的。 丝毫的线索将不胜感激。 my.cnf中 [mysqld] innodb_buffer_pool_size = 256M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES prefork mpm <IfModule mpm_prefork_module> StartServers 3 MinSpareServers 3 MaxSpareServers 6 MaxRequestWorkers 8 MaxConnectionsPerChild 1000 </IfModule> php.ini中 memory_limit = 256M opcache.enable=1 opcache.memory_consumption=192 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.enable_cli=1 htaccess的 php_value memory_limit 512M 的httpd-default.conf Timeout 30 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 2 […]
所以我花了两天的时间试图弄清楚这一点。 我们在Amazon EC2 Large上托pipe了一个相当高stream量的Magento站点,使用Apache w / mpm-prefork,Varnish和APCcaching。 问题在于,CPU突然以100%的速度飙升,从不退出,增加负载并使页面无法使用。 每次Apache启动时都会发生这种情况,通常在几分钟后。 首先som服务器统计: 处理器:64位 vCPU:2 内存(GiB):7.5 现在,我们唯一的补救办法是将实例升级到XLarge,在那里它执行“OK”(平均负载在0.6 – 0.9,但仍然可用)。 尽pipe如此,基于其他网站,大型实例应该足以承载相对较好的性能。 我怀疑我们的prefork设置可能导致这一点。 在大型实例中,我们有以下设置: <IfModule mpm_prefork_module> StartServers 10 MinSpareServers 10 MaxSpareServers 20 ServerLimit 50 MaxClients 50 MaxRequestsPerChild 4000 </IfModule> Timeout 120 KeepAlive On MaxKeepAliveRequests 1000 KeepAliveTimeout 5 当升级到XLarge时,我们用一些更高的prefork设置交换: <IfModule mpm_prefork_module> StartServers 20 MinSpareServers 20 MaxSpareServers 40 ServerLimit 150 MaxClients 150 […]
我相信我在Ubuntu 13.10下正确configuration了Apache MPM,包括PHP-FPM和FCGI,并禁用了mod_php。 当我运行顶部时,我可以清楚地看到多个Apache(〜2-3 MB)和php(〜25-30 MB)进程在运行,随着用户/请求的增加而增加。 现在,令我困惑的是,当我用a2查询-M返回时: prefork 或者用apachectl -V : Server MPM: prefork threaded: no forked: yes (variable process count) 这个可以吗? 还是我错过了一些设置?