Bug 861493 - Minimum thread count for varnish too low, causes hangs
Summary: Minimum thread count for varnish too low, causes hangs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: varnish
Version: 17
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ingvar Hagelund
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 862917
TreeView+ depends on / blocked
 
Reported: 2012-09-28 19:56 UTC by Tom Moertel
Modified: 2012-12-20 16:04 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
: 862917 (view as bug list)
Environment:
Last Closed: 2012-12-20 16:04:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.