When we send RTSP request to NGINX, NGINX will return 400 bad request
without headers and when we have loadbalancers like HAProxy in front of
NGINX because of no headers, HAProxy figured out that the response from
NGINX is invalid and return 502!
Won't you want to send headers with the response for these types of
Does the allocated memory from connection memory pool for a given connection grow as the number of request grows? If so could you elaborate on how much it grows for a new request? If not, I guess the main reason to limit the request number is to limit the lifetime of a connection so the connection pool size is under control, right? Is there an parameter to control the lifetime of a http2 connection instead?
Maxim Dounin mdounin at mdounin.ru<mailto:nginx-devel%40nginx.org?Subject=Re%3A%20HTTP/2%3A%20allow%20unlimited%20number%20of%20requests%20in%20connection&In-Reply-To=%3C20190712142454.GM1877%40mdounin.ru%3E>
Fri Jul 12 14:24:54 UTC 2019
On Mon, Jul 01, 2019 at 11:24:28AM +0200, Michael Würtinger wrote:
> thanks a lot for your reply. Could you please elaborate a little bit
> which memory resources need to be freed periodically? How much memory
> can be held by a connection? What's the worst case scenario?
> We are currently running it in production with http2_max_requests set
> to a value so high that the connection practically lives forever and
> so far we cannot spot any problems but maybe we're missing something?
And example of "wost case" can be seen here:
Memory can be allocated from the connection memory pool. And this
memory have to be freed at some point - so you have to close
the connection to do this. And that's why number of requests in a
particular connection is limited by default.
Whether or not memory allocations happens in your particular use
case - doesn't really matter, especially given that things can
change with seamingly minor configuration and/or client behaviour
In most cases we try to limit allocations from the connection
memory pool to a minimum, yet it is not always possible/convinient to
completely avoid allocations from connection memory pool. This
allows processing of thousands of requests on a single connection
without observable memory impact. Likely millions will also work
except may be in some specific use cases, yet I wouldn't recommend
allowing that many requests, just to be on the safe side.
Dear NGINX developers,
we are using C++ dynamic modules in our NGINX based servers, while multiple Debian distributions have to be supported.
On older Debian distributions it is impossible to use more recent C++ standard, due to build defaulting to system provided clang package.
Our developers stood before decision to either create wrappers around modern C++ libraries which would be compliant with older standards or write the entire logic using obsolete featureless language.
Neither of these approaches is sustainable in terms of developers' productivity and long term maintenance.
Would it be possible to consider a change in dynamic modules' build system, so that C++ flags may be provided?
We propose a low intrusive changes concerning 3 files. The changes are backwards compatible: if CXX is not provided by an user, the build uses CC instead (as well as CFLAGS instead of CXXFLAGS).
Would you be so kind and share your opinion on those? Please find attachment provided bellow (the patch was created using Quilt).
Je dobré vědět, že tento e-mail a přílohy jsou důvěrné. Pokud spolu jednáme o uzavření obchodu, vyhrazujeme si právo naše jednání kdykoli ukončit. Pro fanoušky právní mluvy - vylučujeme tím ustanovení občanského zákoníku o předsmluvní odpovědnosti. Pravidla o tom, kdo u nás a jak vystupuje za společnost a kdo může co a jak podepsat naleznete zde<https://onas.seznam.cz/cz/podpisovy-rad-cz.html>
You should know that this e-mail and its attachments are confidential. If we are negotiating on the conclusion of a transaction, we reserve the right to terminate the negotiations at any time. For fans of legalese—we hereby exclude the provisions of the Civil Code on pre-contractual liability. The rules about who and how may act for the company and what are the signing procedures can be found here<https://onas.seznam.cz/cz/podpisovy-rad-cz.html>.