On Jul 10, 2014, at 6:26 PM, Neddy, NH. Nam <[email protected]> wrote:

> I was looking to the logs and see this error, I have no idea what it's trying 
> to say.
> 
> [Jul 10 10:35:19.360] Server {0x2b92546f1700} ERROR: [211039] number of 
> connections should be greater then zero: 0
> [Jul 10 13:05:44.975] Server {0x2b9253f76ac0} ERROR: [245425] number of 
> connections should be greater then zero: 0
> [Jul 10 13:06:10.950] Server {0x2b9253f76ac0} ERROR: [245535] number of 
> connections should be greater then zero: 0
> [Jul 10 16:24:42.026] Server {0x2b9253f76ac0} ERROR: [277623] number of 
> connections should be greater then zero: 0
> [Jul 10 16:50:25.028] Server {0x2b92546f1700} ERROR: [281678] number of 
> connections should be greater then zero: 0
> 
> This is forward proxy server, could somebody tell me what's problem here?

This message comes from the server (origin) session closing code:

void
HttpServerSession::do_io_close(int alerrno)
...
  // Check to see if we are limiting the number of connections
  // per host
  if (enable_origin_connection_limiting == true) {
    if (connection_count->getCount(server_ip) > 0) {
      connection_count->incrementCount(server_ip, -1);
      char addrbuf[INET6_ADDRSTRLEN];
      Debug("http_ss", "[%" PRId64 "] connection closed, ip: %s, count: %u",
            con_id, 
            ats_ip_ntop(&server_ip.sa, addrbuf, sizeof(addrbuf)), 
            connection_count->getCount(server_ip));
    } else {
      Error("[%" PRId64 "] number of connections should be greater than zero: 
%u",
            con_id, connection_count->getCount(server_ip));
    }
  }

So you are limiting the number of connections to an origin, which means that we 
have to track the connection counts. This code is decrementing the connection 
count, but it is already zero. The error message seems to have the intention of 
telling you that it would have decremented the count below zero, so there's 
probably a counting bug somewhere.

J

Reply via email to