Welcome! Log In Create A New Profile

Advanced

Re: Strange change in writing. (webserver)

Maxim Dounin
September 07, 2010 04:18PM
Hello!

On Mon, Sep 06, 2010 at 11:08:50PM -0400, heric wrote:

> Hello!
>
> I use Nginx / fastcgi.
>
> See the graph of connections:
>
> [img]http://img707.imageshack.us/img707/3285/graf19.png[/img]
>
>
> [b]Normal requests:[/b]
>
> Active connections: 2185
> Reading: 94 Writing: 736 Waiting: 1355
>
> [b]Strange behavior:[/b]
>
> 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...

> [b]part of nginx.conf:[/b]
>
> 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;

.... 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 Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Strange change in writing. (webserver)

heric September 06, 2010 11:08PM

Re: Strange change in writing. (webserver)

JohnMurrat September 07, 2010 02:53PM

Re: Strange change in writing. (webserver)

Maxim Dounin September 07, 2010 04:18PM

Re: Strange change in writing. (webserver)

heric September 08, 2010 01:34AM

Re: Strange change in writing. (webserver)

heric September 08, 2010 11:18AM

Re: Strange change in writing. (webserver)

Reinis Rozitis September 08, 2010 11:50AM

Re: Strange change in writing. (webserver)

heric September 08, 2010 05:00PM

Re: Strange change in writing. (webserver)

heric September 08, 2010 11:41PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready