Mailing List Archive

#1755: The (struct backend).n_conn counter is never decremented
#1755: The (struct backend).n_conn counter is never decremented
----------------------+-------------------
Reporter: Dridi | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: blocker | Keywords:
----------------------+-------------------
You'll eventually reach the maximum number of connections for a given
backend and never be able to reach this backend again.

More on the mailing list:
- https://www.varnish-cache.org/lists/pipermail/varnish-
dev/2015-June/008379.html
- https://www.varnish-cache.org/lists/pipermail/varnish-
dev/2015-June/008380.html

Test case:

{{{
varnishtest "The (struct backend).n_conn counter is never decremented"

server s1 {
rxreq
txresp

rxreq
txresp
} -start

varnish v1 -vcl {
backend s1 {
.host = "${s1_addr}";
.port = "${s1_port}";
.max_connections = 1;
}
} -start

client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200

txreq -url "/bar"
rxresp
expect resp.status == 200
} -run

varnish v1 -expect backend_busy == 0
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1755>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1755: The (struct backend).n_conn counter is never decremented [ In reply to ]
#1755: The (struct backend).n_conn counter is never decremented
----------------------+--------------------
Reporter: Dridi | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: blocker | Resolution:
Keywords: |
----------------------+--------------------

Comment (by Dridi):

I have a patch that solves this issue, but also maintains consistency
between the {{{refcount}}} and {{{n_conn}}} fields, and also with the
{{{(struct tcp_pool).n_used}}} field. It also solves another issue in
pending work on dynamic backends.

The code is currently not ready to be submitted, it needs a bit of
cleaning, especially with regards to locking operations.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1755#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1755: The (struct backend).n_conn counter is never decremented [ In reply to ]
#1755: The (struct backend).n_conn counter is never decremented
----------------------+--------------------
Reporter: Dridi | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: blocker | Resolution:
Keywords: |
----------------------+--------------------

Comment (by Dridi):

Patch submitted:
https://www.varnish-cache.org/lists/pipermail/varnish-
dev/2015-July/008389.html

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1755#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1755: The (struct backend).n_conn counter is never decremented [ In reply to ]
#1755: The (struct backend).n_conn counter is never decremented
----------------------+----------------------------------------
Reporter: Dridi | Owner: Poul-Henning Kamp <phk@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: blocker | Resolution: fixed
Keywords: |
----------------------+----------------------------------------
Changes (by Poul-Henning Kamp <phk@…>):

* status: new => closed
* owner: => Poul-Henning Kamp <phk@…>
* resolution: => fixed


Comment:

In [35716c713ca505a135101e40f32670ca5671bfd1]:
{{{
#!CommitTicketReference repository=""
revision="35716c713ca505a135101e40f32670ca5671bfd1"
Add testcase for this ticket, the error was fixed in the
previous commit.

Fixes: #1755
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1755#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs