Maxim Dounin
March 27, 2019 04:26PM
Hello!

On Wed, Mar 27, 2019 at 02:54:41PM -0400, wkbrad wrote:

> Combine all of that with the fact that this issue happens on all systems and
> that the direct competitor doesn't have this issue, that makes me think this
> is something that Nginx needs to address directly.

If by "direct competitor" you mean Apache you've previously
mentioned in this thread, note that:

- Apache doesn't try to provide a safe configuration reload, and
will be in an unusable state if something goes wrong while
loading the new configuration (not to mention that Apache can't do
a configuration reload while processing ongoing requests at the
same time, and instead pauses all processing till reload is
complete). This is not something nginx can afford, and hence we
do it differently. While our approach may need more memory, this
is something we are ready to pay to make sure no requests will be
lost.

- And, really, nginx and Apache are not direct competitors. If
Apache works for you - use it, it is a reputable server we all
love and use or used in the past. Though it doesn't scale good
enough to thousands of connections, and that's why nginx was
written in the first place. And it also cannot handle upgrades
and configuration reloads seamlessly, so it cannot be used as a
frontend server on loaded sites unless you have a way to direct
traffic to a different server. Nevertheless, even on loaded sites
Apache can be (and often is) used as a backend server behind
nginx, and it does this just fine.

What nginx does to keep configuration reloads seamless certainly
require additional resources, but this is something we do for a
good reason. And this particular problem is relatively easy to
mitigate by keeping a configuration small (the other side of the
problem is that you anyway need about 2x memory on the server,
including various client-related buffers, so nginx will be able to
start two sets of worker processes during the configuration
reload, and this is something you can't mitigate at all; the good
part is that this memory is not wasted but used for page cache
between reloads). Also, if you really think this is a major
problem, you may want to start working on improving system
allocators to handle this better, it is something certainly
possible.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Possible memory leak?

wkbrad February 28, 2019 01:43PM

Re: Possible memory leak?

Maxim Dounin February 28, 2019 03:08PM

Re: Possible memory leak?

wkbrad February 28, 2019 03:54PM

Re: Possible memory leak?

Maxim Dounin February 28, 2019 04:50PM

Re: Possible memory leak?

wkbrad February 28, 2019 05:06PM

RE: Possible memory leak?

Reinis Rozitis February 28, 2019 05:28PM

Re: Possible memory leak?

Alceu R. de Freitas Jr. via nginx February 28, 2019 06:02PM

Re: RE: Possible memory leak?

wkbrad February 28, 2019 06:44PM

Re: Possible memory leak?

wkbrad March 07, 2019 01:33PM

Re: Possible memory leak?

Anoop Alias March 07, 2019 08:06PM

Re: Possible memory leak?

wkbrad March 07, 2019 09:35PM

Re: Possible memory leak?

Anoop Alias March 07, 2019 10:10PM

Re: Possible memory leak?

wkbrad March 08, 2019 10:39AM

Re: Possible memory leak?

Anoop Alias March 08, 2019 06:54PM

Re: Possible memory leak?

gariac March 08, 2019 01:10AM

Re: Possible memory leak?

wkbrad March 08, 2019 10:42AM

Re: Possible memory leak?

gariac March 08, 2019 08:08PM

Re: Possible memory leak?

wkbrad March 11, 2019 04:37PM

Re: Possible memory leak?

Anoop Alias March 12, 2019 09:56AM

Re: Possible memory leak?

Maxim Dounin March 12, 2019 10:40AM

Re: Possible memory leak?

Anoop Alias March 12, 2019 11:00AM

Re: Possible memory leak?

Maxim Dounin March 12, 2019 11:48AM

Re: Possible memory leak?

wkbrad March 12, 2019 02:09PM

Re: Possible memory leak?

Maxim Dounin March 12, 2019 09:58PM

Re: Possible memory leak?

Peter Booth via nginx March 13, 2019 01:44AM

Re: Possible memory leak?

Anoop Alias March 13, 2019 01:54AM

Re: Possible memory leak?

wkbrad March 20, 2019 06:41PM

Re: Possible memory leak?

Maxim Dounin March 21, 2019 09:46AM

Re: Possible memory leak?

Maxim Dounin March 21, 2019 09:48AM

Re: Possible memory leak?

wkbrad March 21, 2019 11:29AM

Re: Possible memory leak?

Maxim Dounin March 21, 2019 02:18PM

Re: Possible memory leak?

wkbrad March 21, 2019 05:55PM

Re: Possible memory leak?

Maxim Dounin March 25, 2019 08:40AM

Re: Possible memory leak?

wkbrad March 27, 2019 02:54PM

Re: Possible memory leak?

Maxim Dounin March 27, 2019 04:26PM

Re: Possible memory leak?

gariac March 13, 2019 01:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready