New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
varnishd: add backend age & reuses to Open & Close #4007
base: master
Are you sure you want to change the base?
Conversation
This extra information comes handy when trubleshooting idle timeout from the backend. Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>
"\t%d %s %s [ %s ]\n" | ||
"\t| | | |\n" | ||
"\t| | | +- Optional reason\n" | ||
"\t| | +------ \"close\" or \"recycle\"\n" | ||
"\t| +--------- Backend display name\n" | ||
"\t+------------ Connection file descriptor\n" | ||
"\t%d %s %s %.6f %ld [ %s ]\n" | ||
"\t| | | | | |\n" | ||
"\t| | | | | +- Optional reason\n" | ||
"\t| | | | +------- Backend reuses\n" | ||
"\t| | | +------------ Backend age in seconds\n" | ||
"\t| | +--------------- \"close\" or \"recycle\"\n" | ||
"\t| +------------------ Backend display name\n" | ||
"\t+--------------------- Connection file descriptor\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, and since we are adding the same fields to two tags, maybe we should limit this to BackendOpen
? We can deduce the values for BackendClose
anyway based on whether we created a brand new connection or reused one from the pool.
"\t%d %s %s %s %s %s %s %.6f %ld\n" | ||
"\t| | | | | | | | |\n" | ||
"\t| | | | | | | | +- Backend reuses\n" | ||
"\t| | | | | | | +------ Backend age in seconds\n" | ||
"\t| | | | | | +--------- \"connect\" or \"reuse\"\n" | ||
"\t| | | | | +------------ Local port\n" | ||
"\t| | | | +--------------- Local address\n" | ||
"\t| | | +------------------ Remote port\n" | ||
"\t| | +--------------------- Remote address\n" | ||
"\t| +------------------------ Backend display name\n" | ||
"\t+--------------------------- Connection file descriptor\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would rather refer to Connection uses
and Connection age
(everything is in seconds since 4.0 anyway).
Also, I would probably make these fields optional, they aren't really helpful in the "connect" case.
vtim_real | ||
PFD_Age(const struct pfd *p) | ||
{ | ||
CHECK_OBJ_NOTNULL(p, PFD_MAGIC); | ||
return (VTIM_real() - p->created); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably have a now
at the call site we can pass here.
This extra information comes handy when trubleshooting idle timeout from the backend.