Apache TIME_WAIT connections, php on solaris 11.2 -


i have server apache server php.

  • s.o. solaris 11.2
  • apache 2.2
  • php 5.3.28

  • ram 20g

  • 16 cores

in apache have configured 40 domains, following characteristics:

<virtualhost *:80>     servername domain.com     logformat       "%{x-forwarded-for}i %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" **%t/%d**" combined_t     errorlog        "|/usr/apache2/2.2/bin/rotatelogs  /opt/avv2002_data/logs/domain_err.%y%m%d 86400"     customlog       "|/usr/apache2/2.2/bin/rotatelogs  /opt/avv2002_data/logs/domain_log.%y%m%d 86400" combined_t     loglevel  info     documentroot "/opt/www/apache/joomla/sites/"    directoryindex index.htm index.html index.php     <directory "/opt/www/apache/joomla/sites/">         options -indexes followsymlinks includes multiviews allowoverride         rewriteengine on         rewritecond %{request_filename} -s [or]         rewritecond %{request_filename} -l [or]         rewritecond %{request_filename} -d         rewriterule ^.*$ - [nc,l]         rewriterule ^.*$ index.html [nc,l]     </directory> </virtualhost> 

a few days ago development uploaded new application in php , server started problems ram , cpu, looking bit found following:

too many process, children , time_wait.

example:

use swap.

extract swap pmap

swap: 212276 bytes pid: 23158

# ps auxww | grep 23158  webservd 23158  0.1  0.121227628216 ?        s 11:49:57  0:06 /usr/apache2/2.2/bin/httpd -k start 

see many time_wait

netstat -aun | grep 23158  serverip.80      serverip.61768   root      23158 httpd           44876      0   65160      0 time_wait serverip.80      serverip.31254   root      23158 httpd            7843      0   65160      0 time_wait serverip.80      serverip.55937   root      23158 httpd            7262      0   65160      0 time_wait serverip.80      serverip.52572   root      23158 httpd            4845      0   65160      0 time_wait serverip.80      serverip.49687   root      23158 httpd            7075      0   65160      0 time_wait serverip.80      serverip.29891   root      23158 httpd           29310      0   65160      0 time_wait serverip.80      serverip.57332   root      23158 httpd            9557      0   65160      0 time_wait serverip.80      serverip.20296   root      23158 httpd            7262      0   65160      0 time_wait serverip.80      serverip.16077   root      23158 httpd           61246      0   65160      0 time_wait  .......   netstat -aun | grep "ipserver.80" | wc -l 2077  ps auxww | grep "/usr/apache2/2.2/bin/httpd -k start" | wc -l 507 

my apache server status show full wwwwwwwwwwwww

pache server status serverip  server version: apache/2.2.27 (unix) mod_ssl/2.2.27 openssl/1.0.1h dav/2 php/5.3.28 mod_fcgid/2.3.9 server built: jun 17 2014 11:19:37 current time: wednesday, 05-apr-2017 13:50:10 cdt restart time: wednesday, 05-apr-2017 13:12:10 cdt parent server generation: 0 server uptime: 38 minutes total accesses: 125046 - total traffic: 3.6 gb cpu usage: u404.25 s342.99 cu0 cs0 - 32.8% cpu load 54.8 requests/sec - 1.6 mb/second - 30.4 kb/request 29 requests being processed, 0 idle workers  wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwww 

is there way see domain 1 lot of traffic? in way know what team of development modified

i thinking of profiler of php, see domain taking longer

any idea else should check?

you have reached maximum number of workers, need increase it. have posted guide on how increase max number of apache workers on whm, in case, need manually in configuration file of apache (change maxclients 1024).

now question is, why did reach maximum number of workers, because real traffic, or because of else?

my advice check apache logs (i don't know structure on solaris, last time worked on in 2004) , see website having traffic (it traffic biggest log). should analyze traffic: real traffic? bot traffic? if bot traffic, legitimate bot traffic (if not, should block illegitimate bots)?

if real traffic, have lot of 404s? if yes, need address 404s - because each 404 need worker in joomla instance.


Comments