Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 861493

Summary: Minimum thread count for varnish too low, causes hangs
Product: [Fedora] Fedora Reporter: Tom Moertel <tom>
Component: varnishAssignee: Ingvar Hagelund <ingvar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17CC: ingvar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 862917 (view as bug list) Environment:
Last Closed: 2012-12-20 16:04:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 862917    

Description Tom Moertel 2012-09-28 19:56:26 UTC
Description of problem:
The varnish.params file [1] that ships with the varnish package sets VARNISH_MIN_THREADS=1, but this is too few to ensure that Varnish can always make progress. The upstream sources [2] suggest a default minimum of 5, and that probably ought to be our default, too.

[1] http://pkgs.fedoraproject.org/cgit/varnish.git/tree/varnish.params
[2] https://github.com/varnish/Varnish-Cache/blob/master/redhat/varnish.params

Steps to Reproduce:
1. Put Varnish in front of a web service that, in response to an outside request, makes nested requests to Varnish before returning (e.g., to purge stale resources).
2. Hit the web service, triggering its nested requests to Varnish while Varnish is waiting for the web service's reply to its initial request.
  
Actual results:
Varnish hangs until the requests time out.

Expected results:
No hangs. Just progress, progress, progress.

Additional info:

Comment 1 Tom Moertel 2012-09-28 20:29:41 UTC
See also this advice from Per Buer of Varnish Software: 

"Having a min_threads of 1 can trigger some bugs so I suggest you raise the minimum to at least 10. There is really no point in being so skimpy with the threads, Peter. -w 16,512,120 should be the minimum."

Source: https://www.varnish-cache.org/forum/topic/388

Comment 2 Fedora Update System 2012-10-09 23:24:46 UTC
varnish-3.0.3-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/varnish-3.0.3-3.fc18

Comment 3 Fedora Update System 2012-10-09 23:24:56 UTC
varnish-3.0.3-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/varnish-3.0.3-3.fc16

Comment 4 Fedora Update System 2012-10-09 23:25:07 UTC
varnish-3.0.3-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/varnish-3.0.3-3.fc17

Comment 5 Fedora Update System 2012-10-09 23:25:19 UTC
varnish-3.0.3-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/varnish-3.0.3-3.el6

Comment 6 Fedora Update System 2012-10-10 05:05:14 UTC
Package varnish-3.0.3-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing varnish-3.0.3-3.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15790/varnish-3.0.3-3.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-20 16:04:47 UTC
varnish-3.0.3-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.