我必须更改事件mpm默认配置以解决错误(记分板已满,而不是MaxRequestWorkers.Increase,ServerLimit)但是在httpd.conf文件中进行更改后我无法看到任何影响。
虽然我检查了httpd进程,但它显示3个服务器正在运行25个线程。请在下面找到详细信息
[q@mohitm ~]$ ps -ef|grep httpd
root 67465 1 0 22:00 ? 00:00:00 /usr/sbin/httpd
tomcat 67467 67465 0 22:00 ? 00:00:00 /usr/sbin/httpd
tomcat 67468 67465 0 22:00 ? 00:00:00 /usr/sbin/httpd
tomcat 67470 67465 0 22:00 ? 00:00:00 /usr/sbin/httpd
sdlansi 68271 65078 0 22:21 pts/0 00:00:00 grep --color=auto httpd
[q@mohitm ~]$ ps -eLo pid,lwp,nlwp,ruser,pcpu,stime,etime,args|grep 67467
67467 67467 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67471 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67472 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67479 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67480 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67481 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67482 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67483 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67484 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67485 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67486 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67487 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67489 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67491 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67493 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67496 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67498 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67500 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67502 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67504 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67506 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67508 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67510 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67512 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67514 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67516 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
67467 67518 27 tomcat 0.0 22:00 22:23 /usr/sbin/httpd
68283 68283 1 sdlansi 0.0 22:22 00:00 grep --color=auto 67467
在httpd.conf中我已添加以下配置来调整甚至mpm - 完成后重新启动我的apache服务器以应用请帮助我检查我的配置是否适用。 上面的工件显示只有3台服务器运行25 ThreadsPerChild的
<IfModule mpm_event_module>
StartServers 6 #default 3
ServerLimit 512 #default 16
ThreadsPerChild 25 #25
MaxRequestWorkers 12800 #default 400(16x25)
AsyncWorkerFactor 2
MinSpareThreads 64 # MaxRequestWorkers / 4
MaxSpareThreads 256 #64 MinSpareThreads * 3
MaxConnectionsPerChild 0
</IfModule>
apache服务器详细信息
[root@mohitm ~]# apachectl -V
Server version: Apache/2.4.4 (Unix)
Server built: Apr 16 2014 17:28:21
Server's Module Magic Number: 20120211:11
Server loaded: APR 1.5.0, APR-UTIL 1.5.3
Compiled using: APR 1.5.0, APR-UTIL 1.5.3
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types"
-D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"
机器:8核16 GB
答案 0 :(得分:0)
您可以使用名为check_httpd_limits的模块来检查您的apache的事件类型。它将显示apache正在使用的已配置参数及其各自的值。有关详细信息,请访问以下链接。
答案 1 :(得分:0)