Strange change in writing. (webserver)

Hello!

I use Nginx / fastcgi.

See the graph of connections:

Normal requests:

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.

part of nginx.conf:

worker_processes 2;
events {
worker_connections 11000;
}
http {
keepalive_timeout 30 60;
limit_zone eueu $binary_remote_addr 10m;
limit_req_zone $binary_remote_addr zone=one:10m rate=2r/s;

server {

    location ~ \.php$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME

/var/www$fastcgi_script_name;
include fastcgi_params;
}

limit_conn eueu 30;
limit_req zone=one burst=5;

}

Could anyone help me?

(sorry my bad english)

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,127823,127823#msg-127823

I have the same problem.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,127823,128087#msg-128087

Hello!

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.

Maxim D.

apparently, php-cgi is causing server overload. How to reduce overload?

thanks

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,127823,128455#msg-128455

Thanks for the reply!

Maxim D. Wrote:

Maxim D.

I think it is. But how can solve?

My server is 2x quad core / 16gb ram / 6x300gb raid5 / 1gbps full duplex
/ debian lenny.

can be resolved or should I upgrade the server?

Thanks in advance!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,127823,128259#msg-128259

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 (
http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_cache ), varnish as
front), by adding more hardware …

rr

Hello!

Thanks for reply!

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?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,127823,128582#msg-128582

PHP_FCGI_CHILDREN changed from 8 to 16 and the server stabilized. the
two times it was slow, was improved without my intervention.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,127823,128666#msg-128666

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs