Skip to content
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

http: Warn if less workers used than urls #2757

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion modules/http/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,17 @@ http_dd_init(LogPipe *s)
"It is recommended that you set persist-name() in this case as syslog-ng will be "
"using the first URL in urls() to register persistent data, such as the disk queue "
"name, which might change",
evt_tag_str("url", self->load_balancer->targets[0].url));
evt_tag_str("url", self->load_balancer->targets[0].url),
log_pipe_location_tag(&self->super.super.super.super));
}
if (self->load_balancer->num_targets > self->super.num_workers)
{
msg_warning("WARNING: your http() driver instance uses less workers than urls. "
"It is recommended to increase the number of workers to at least the number of servers, "
"otherwise not all urls will be used for load-balancing",
evt_tag_int("urls", self->load_balancer->num_targets),
evt_tag_int("workers", self->super.num_workers),
log_pipe_location_tag(&self->super.super.super.super));
}
/* we need to set up url before we call the inherited init method, so our stats key is correct */
self->url = self->load_balancer->targets[0].url;
Expand Down