On Mon, Sep 06, 2010 at 11:08:50PM -0400, heric wrote:
Active connections: 2185
Reading: 94 Writing: 736 Waiting: 1355
Strange behavior:
Active connections: 10893
Reading: 136 Writing: 9454 Waiting: 1303
Periodically, the number of “Writing” requests increases, slowing the
server.
“Writing” state counts requests with already read request headers,
but not yet fully answered.
Increase may indicate that your backend(s) don’t cope with load
and nginx is waiting for backend replies…
limit_conn eueu 30;
limit_req zone=one burst=5;
… or requests are just sitting in limit_req’s delay. Extra 8k
connections with limit_conn set to 30 will require only something
about 300 clients. And 2r/s is quite low, especially if images
are on the same server with the same limits applied, and likely to
delay significant part of your users. You may want to try
limit_req with ‘nodelay’ flag. Or at least do some stats to check
if the above actually applies.
apparently, php-cgi is causing server overload. How to reduce overload?
By optimising your php code, using php opcode cache (apc, xcache,
eaccelerator), by caching page parts (apc, memcache), by caching whole
output (nginx fastcgi cache ( Module ngx_http_fastcgi_module ), varnish as
front), by adding more hardware …
Why the overload is not growing? The change is sudden. Is this normal?
How to enable memcache after install? Must enter the code in the php.ini
or recompilar php?