mail proxy auth_http stats

Naresh V nareshov at gmail.com
Tue Oct 26 21:04:31 MSD 2010


Hi,

I have a mail proxy configured alongside the following:

http {
        perl_modules /etc/nginx/perl/lib;
        perl_require mailauth.pm;   // there's a Perl::DBI call here

        server {
                listen 81;
                location /auth {
                         perl mailauth::handler;
                }
                location /stats {
                         stub_status on;
                         access_log off;
                }
}

and my mail proxy uses this server :81/auth for auth_http

when i curl :81/stats, I always get only 1 in writing:


Active connections: 149
server accepts handled requests
 4945 4945 2465
Reading: 0 Writing: 1 Waiting: 148

I initially thought that this was due to some sort of a limitation of
using the embedded-perl interpretor of nginx and so i removed this
logic out and served it out of a different nginx+thin+rackup script
(an ActiveRecord call) which implemented the same redirection logic i
had wired in earlier in mailauth.pm.


So now I have one instance of nginx on server A acting solely as a
mail proxy and another on server B serving as auth_http server.

This time, stats from server B was like:

Active connections: 1
server accepts handled requests
   1985 1985 1985
Reading: 0 Writing: 1 Waiting: 0


I don't follow why "writing" is always 1.
I've even setup multiple mail proxy nginx instances to use the same
server B's :81/auth as auth_http URI and yet I have writing = 1.

I've seen other nginx+tomcat setups where stats are like:

Active connections: 39
server accepts handled requests
 421439 421439 986972
Reading: 0 Writing: 28 Waiting: 11

(writing > 1)


Can someone explain why this is the case?


-Naresh V.



More information about the nginx mailing list