VSL·续
%s %s %s | | | | | +-- Listener name (from -a) | +----- Client Port number (0 for Unix domain sockets) +-------- Client IP4/6 address (0.0.0.0 for UDS)
ReqURL - Client request URL
The HTTP request URL.
ReqUnset - Client request unset header
HTTP header contents.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
RespHeader - Client response header
HTTP header contents.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
RespProtocol - Client response protocol
The HTTP protocol version information.
RespReason - Client response reason
The HTTP response reason string.
RespStatus - Client response status
The HTTP response status code.
RespUnset - Client response unset header
HTTP header contents.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
SessClose - Client connection closed
SessClose is the last record for any client connection.
The format is:
%s %f | | | +- How long the session was open +---- Why the connection closed
Explanation of reasons (first column): : * REM_CLOSE: Client Closed * REQ_CLOSE: Client requested close * REQ_HTTP10: Proto < HTTP/1.1 * RX_BAD: Received bad req/resp * RX_BODY: Failure receiving body * RX_JUNK: Received junk data * RX_OVERFLOW: Received buffer overflow * RX_TIMEOUT: Receive timeout * RX_CLOSE_IDLE: timeout_idle reached * TX_PIPE: Piped transaction * TX_ERROR: Error transaction * TX_EOF: EOF transmission * RESP_CLOSE: Backend/VCL requested close * OVERLOAD: Out of some resource * PIPE_OVERFLOW: Session pipe overflow * RANGE_SHORT: Insufficient data for range * REQ_HTTP20: HTTP2 not accepted * VCL_FAILURE: VCL failure * RAPID_RESET: HTTP2 rapid reset
SessError - Client connection accept failed
Accepting a client connection has failed.
The format is:
%s %s %s %d %d %s | | | | | | | | | | | +- Detailed error message | | | | +---- Error Number (errno) from accept(2) | | | +------- File descriptor number | | +---------- Local TCP port / 0 for UDS | +------------- Local IPv4/6 address / 0.0.0.0 for UDS +---------------- Socket name (from -a argument)
SessOpen - Client connection opened
The first record for a client connection, with the socket-endpoints of the connection.
The format is:
%s %d %s %s %s %f %d | | | | | | | | | | | | | +- File descriptor number | | | | | +---- Session start time (unix epoch) | | | | +------- Local TCP port / 0 for UDS | | | +---------- Local IPv4/6 address / 0.0.0.0 for UDS | | +------------- Socket name (from -a argument) | +---------------- Remote TCP port / 0 for UDS +------------------- Remote IPv4/6 address / 0.0.0.0 for UDS
Storage - Where object is stored
Type and name of the storage backend the object is stored in.
The format is:
%s %s | | | +- Name of storage backend +---- Type ("malloc", "file", "persistent" etc.)
TTL - TTL set on object
A TTL record is emitted whenever the ttl, grace or keep values for an object is set as well as whether the object is cacheable or not.
The format is:
%s %d %d %d %d [ %d %d %u %u ] %s | | | | | | | | | | | | | | | | | | | +- "cacheable" or "uncacheable" | | | | | | | | +------ Max-Age from Cache-Control header | | | | | | | +--------- Expires header | | | | | | +------------ Date header | | | | | +--------------- Age (incl Age: header value) | | | | +-------------------- Reference time for TTL | | | +----------------------- Keep | | +-------------------------- Grace | +----------------------------- TTL +-------------------------------- "RFC", "VCL" or "HFP"
The four optional fields are only present in “RFC” headers.
Examples:
default RFC 60 10 -1 1312966109 1312966109 1312966109 0 60 cacheable VCL 120 10 0 1312966111 uncacheable HFP 2 0 0 1312966113 uncacheable
Timestamp - Timing information
Contains timing information for the Varnish worker threads.
Time stamps are issued by Varnish on certain events, and show the absolute time of the event, the time spent since the start of the work unit, and the time spent since the last timestamp was logged. See the TIMESTAMPS section below for information about the individual time stamps.
The format is:
%s: %f %f %f | | | | | | | +- Time since last timestamp | | +---- Time since start of work unit | +------- Absolute time of event +----------- Event label
VCL_Error - VCL execution error message
Logs error messages generated during VCL execution.
VCL_Log - Log statement from VCL
User generated log messages insert from VCL through std.log()
VCL_acl - VCL ACL check results
ACLs with the +log flag emits this record with the result.
The format is:
%s [%s [%s [fixed: %s]]] | | | | | | | +- Fix info (see below) | | +------------ Matching entry (only for MATCH) | +---------------- Name of the ACL for MATCH or NO_MATCH +-------------------- MATCH, NO_MATCH or NO_FAM
- Fix info: either contains network/mask for non-canonical entries (see acl +pedantic flag) or
foldedfor entries which were the result of a fold operation (see acl +fold flag). *MATCHdenotes an ACL match *NO_MATCHdenotes that a checked ACL has not matched *NO_FAMdenotes a missing address family and should not occur. VCL_call - VCL method called Logs the VCL method name when a VCL method is called. VCL_return - VCL method return value Logs the VCL method terminating statement. VCL_trace - VCL trace data Logs VCL execution trace data.
The format is:
%s %u %u.%u.%u | | | | | | | | | +- VCL program line position | | | +---- VCL program line number | | +------- VCL program source index | +---------- VCL trace point index +------------- VCL configname
NB: This log record is masked by default.
VCL_use - VCL in use
Records the name of the VCL being used.
The format is:
%s [ %s %s ] | | | | | +- Name of label used to find it | +---- "via" +--------- Name of VCL put in use
VSL - VSL API warnings and error message
Warnings and error messages generated by the VSL API while reading the shared memory log.
VdpAcct - Deliver filter accounting
Contains name of VDP and statistics.
The format is:
%s %d %d | | | | | +- Total bytes produced | +---- Number of calls made +------- Name of filter
NB: This log record is masked by default.
VfpAcct - Fetch filter accounting
Contains name of VFP and statistics.
The format is:
%s %d %d | | | | | +- Total bytes produced | +---- Number of calls made +------- Name of filter
NB: This log record is masked by default.
Witness - Lock order witness records
Diagnostic recording of locking order.
WorkThread - Logs thread start/stop events
Logs worker thread creation and termination events.
The format is:
%p %s | | | +- [start|end] +---- Worker struct pointer
NB: This log record is masked by default.
TIMESTAMPS#
Timestamps are inserted in the log on completing certain events during the worker thread’s task handling. The timestamps has a label showing which event was completed. The reported fields show the absolute time of the event, the time spent since the start of the task and the time spent since the last timestamp was logged.
The timestamps logged automatically by Varnish are inserted after completing events that are expected to have delays (e.g. network IO or spending time on a waitinglist). Timestamps can also be inserted from VCL using the std.timestamp() function. If one is doing time consuming tasks in the VCL configuration, it’s a good idea to log a timestamp after completing that task. This keeps the timing information in subsequent timestamps from including the time spent on the VCL event.
Request handling timestamps#
Start The start of request processing (first byte received or restart). Req Complete client request received. ReqBody Client request body processed (discarded, cached or passed to the backend). Waitinglist Came off waitinglist. Fetch Fetch processing finished (completely fetched or ready for streaming). Process Processing finished, ready to deliver the client response. Resp Delivery of response to the client finished. Restart Client request is being restarted. Reset The client closed its connection, reset its stream or caused a stream error that forced Varnish to reset the stream. Request processing is interrupted and considered failed, with a 408 “Request Timeout” status code.
Pipe handling timestamps#
The following timestamps are client timestamps specific to pipe transactions:
Pipe Opened a pipe to the backend and forwarded the request. PipeSess The pipe session has finished.
The following timestamps change meaning in a pipe transaction:
Process Processing finished, ready to begin the pipe delivery.
Backend fetch timestamps#
Start Start of the backend fetch processing. Fetch Came off vcl_backend_fetch ready to send the backend request. Connected Successfully established a backend connection, or selected a recycled connection from the pool. Bereq Backend request sent. Beresp Backend response headers received. Process Processing finished, ready to fetch the response body. BerespBody Backend response body received. Retry Backend request is being retried. Error Backend request failed to vcl_backend_error.
NOTICE MESSAGES#
Notice messages contain informational messages about the handling of a request. These can be exceptional circumstances encountered that causes deviation from the normal handling. The messages are prefixed with vsl: for core Varnish generated messages, and VMOD authors are encouraged to use vmod_<name>: for their own notice messages. This matches the name of the manual page where detailed descriptions of notice messages are expected.
The core messages are described below.
Conditional fetch wait for streaming object#
The backend answered 304 Not Modified on a conditional fetch using an object that has not yet been fully fetched as the stale template object. This can only happen when the TTL of the object is less than the time it takes to fetch it. The fetch is halted until the stale object is fully fetched, upon which the new object is created as normal. While waiting, any grace time on the stale object will be in effect.
High number of variants#
Objects are primarily looked up from an index using the hash key computed from the hash_data() VCL function. When variants are involved, that is to say when a backend response was stored with a Vary header, a secondary lookup is performed but it is not indexed. As the number of variants for a given key increases, this can slow cache lookups down, and since this happens under a lock, this can greatly increase lock contention, even more so for frequently requested objects. Variants should therefore be used sparingly on cacheable responses, but since they can originate from either VCL or origin servers, this notice should help identify problematic resources.
HISTORY#
This document was initially written by Poul-Henning Kamp, and later updated by Martin Blix Grydeland.
SEE ALSO#
COPYRIGHT#
This document is licensed under the same licence as Varnish itself. See LICENCE for details.
- Copyright (c) 2006 Verdens Gang AS
- Copyright (c) 2006-2015 Varnish Software AS
