Sylvain Kalache
Sylvain Kalache

Reputation: 371

Ngninx reports 8 active connections even though there are not

I compiled Nginx 1.2.4 with --with-http_stub_status_module.

When I query Nginx regarding its current status it returns 8 Active connections which are all Writing type:

Active connections: 8 
server accepts handled requests
5011178 5011178 5011178 
Reading: 0 Writing: 8 Waiting: 0 

However there is absolutely no more established connection to my Nginx except the curl I'm performing to get the status.

Any idea why Nginx returns this number of Active connections?

Upvotes: 0

Views: 416

Answers (1)

Michał Kupisiński
Michał Kupisiński

Reputation: 3863

Active connections don't represented number of request to your app. If your app serves some html pages then each element like image, css or js (if isn't cached in browser or other user client) will be also requested from your server. So for one html pages there can be many active connections.

But... as I know they will be as Reading or Waiting connections and in your example there are Writing. If you are extremely sure that there is only one request from curl made by you then check your nginx or some proxy (if exists) configuration because it's look like client connections aren't closed after some POST request or Uploads.

Upvotes: 1

Related Questions