V
V
vlarkanov2020-03-02 10:46:26
linux
vlarkanov, 2020-03-02 10:46:26

Nginx + limit_req: how to log dropped requests?

The limit_req_zone zone is configured $binary_remote_addr zone=one:10m rate=12r/s;
This zone is registered in all site locations.

The benchmark shows that the zone is working:

ab -n 100 -c 1 https://my_site.ru/*
Benchmarking my_site.ru (be patient)...apr_pollset_poll: The timeout specified has expired (70007)
Total of 12 requests completed


But I need messages about "dropped" requests to get into the error log. I tried to write limit_req_log_level error; - did not help. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vlarkanov, 2020-03-02
@vlarkanov

In general, everything works, I'm a fool myself: I had to put MANY requests in parallel:
ab -n 100 -c 20 https://my_site.ru/*
Then everything is logged in error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question