Varnish-Agent Fails if Varnish Task Started using Param Flag on Command

Drew, AJ Drew.AJ at principal.com
Wed Feb 17 13:43:31 CET 2016


Hello,

In both version 4.0 and 4.1 of Varnish and the v4 version of the Varnish-agent I have run across the problem where the Varnish-agent will terminate itself.

This happens if I use the '-p' flag to override or supply a value for a varnish parameter on startup.

I am running Redhat v6 using Apache 2.2.

The error in the log looks like this:
      Feb 16 10:43:06 ul2378 varnishd[17403]: CLI telnet 127.0.0.1 56983 127.0.0.1 6082 Rd param.show -l
      Feb 16 10:43:06 ul2378 varnishd[17403]: CLI telnet 127.0.0.1 56983 127.0.0.1 6082 Wr 200 accept_filter#012        Value is: off [bool] (default)#012#012        Enable kernel accept-filters (if available in the kernel).#012#012        NB: This parameter will not take any effect until the child#012        process has been restarted.#012#012acceptor_sleep_decay#012        Value is: 0.9 (default)#012        Minimum is: 0#012        Maximum is: 1#012#012        If we run out of resources, such as file descriptors or worker#012        threads, the acceptor will sleep between accepts.#012        This parameter (multiplicatively) reduce the sleep duration for#012        each successful accept. (ie: 0.9 = reduce by 10%)#012#012        NB: We do not know yet if it is a good idea to change this#012        parameter, or if the default value is even sensible.  Caution#012        is advised, and feedback is most welcome.#012#012acceptor_sleep_incr#012        Value is: 0.000 [seconds] (default)#012        Minimum is: 0.000#012        Maximum is: 1.000#012#012        If we run out of resources, such as file descriptors or worker#012        threads, the acceptor will sleep between accepts.#012        This parameter control how much longer we sleep, each time we#012        fail to accept a new connection.#012#012        NB: We do not know yet if it is a good idea to change this#012        parameter, or if the default value is even sensible.  Caution#012        is advised, and feedback is most welcome.#012#012acceptor_sleep_max#012        Value is: 0.050 [seconds] (default)#012        Minimum is: 0.000#012        Maximum is: 10.000#012#012        If we run out of resources, such as file descriptors or worker#012        threads, the acceptor will sleep between accepts.#012        This parameter limits how long it can sleep between attempts to#012        accept new connections.#012#012        NB: We do not know yet if it is a good idea to change this#012        parameter, or if the default value is even sensible.  Caution#012
      Feb 16 10:43:06 ul2378 varnish-agent[29721]: modules/vparams.c:171: vparams_show_json: Assertion `term' failed. Aborting.


In this case the 3 params that I was overriding were:
     -p thread_pool_min=${VARNISH_MIN_THREADS} \
     -p thread_pool_max=${VARNISH_MAX_THREADS} \
     -p thread_pool_timeout=${VARNISH_THREAD_TIMEOUT} \

In my /etc/sysconfig/varnish file, I had:
      # # The minimum number of worker threads to start
      VARNISH_MIN_THREADS=50
      #
      # # The Maximum number of worker threads to start
      VARNISH_MAX_THREADS=1000
      #
      # # Idle timeout for worker threads
      VARNISH_THREAD_TIMEOUT=120
      ...
      # # DAEMON_OPTS is used by the init script.  If you add or remove options, make
      # # sure you update this section, too.
      DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
                   -f ${VARNISH_VCL_CONF} \
                   -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
                   -t ${VARNISH_TTL} \
                   -p thread_pool_min=${VARNISH_MIN_THREADS} \
                   -p thread_pool_max=${VARNISH_MAX_THREADS} \
                   -p thread_pool_timeout=${VARNISH_THREAD_TIMEOUT} \
                   -n "varnish_pcom" \
                   -S ${VARNISH_SECRET_FILE} \
                   -s ${VARNISH_STORAGE}"


If I remove the 3 '-p' lines, everything works just fine.

I thought I would share this information.

Thanks!

A J Drew


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to Connect at principal.com and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents any time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20160217/c95d668b/attachment.html>


More information about the varnish-misc mailing list