Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
f0b50447
Commit
f0b50447
authored
Dec 10, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release wrk->vcl before (potentially) long-running worker jobs which do
not need it (acceptor, h2_sess)
parent
14136d4a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+4
-6
cache_http2_session.c
bin/varnishd/http2/cache_http2_session.c
+3
-0
No files found.
bin/varnishd/cache/cache_acceptor.c
View file @
f0b50447
...
...
@@ -460,6 +460,10 @@ vca_accept_task(struct worker *wrk, void *arg)
while
(
!
pool_accepting
)
VTIM_sleep
(.
1
);
/* Dont hold on to (possibly) discarded VCLs */
if
(
wrk
->
vcl
!=
NULL
)
VCL_Rel
(
&
wrk
->
vcl
);
while
(
!
ps
->
pool
->
die
)
{
INIT_OBJ
(
&
wa
,
WRK_ACCEPT_MAGIC
);
wa
.
acceptlsock
=
ls
;
...
...
@@ -547,12 +551,6 @@ vca_accept_task(struct worker *wrk, void *arg)
if
(
!
ps
->
pool
->
die
&&
DO_DEBUG
(
DBG_SLOW_ACCEPTOR
))
VTIM_sleep
(
2
.
0
);
/*
* We were able to hand off, so release this threads VCL
* reference (if any) so we don't hold on to discarded VCLs.
*/
if
(
wrk
->
vcl
!=
NULL
)
VCL_Rel
(
&
wrk
->
vcl
);
}
}
...
...
bin/varnishd/http2/cache_http2_session.c
View file @
f0b50447
...
...
@@ -344,6 +344,9 @@ h2_new_session(struct worker *wrk, void *arg)
sp
=
req
->
sp
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
if
(
wrk
->
vcl
)
VCL_Rel
(
&
wrk
->
vcl
);
assert
(
req
->
transport
==
&
H2_transport
);
assert
(
req
->
err_code
==
H2_PU_MARKER
||
req
->
err_code
==
H2_OU_MARKER
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment