Welcome! Log In Create A New Profile

Advanced

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

Maxim Dounin
September 23, 2016 12:10PM
Hello!

On Fri, Sep 23, 2016 at 05:20:56AM -0400, JohnCarne wrote:

> Hello,
>
> [root@web1 ~]# nginx -v
> nginx version: nginx/1.11.4
>
> We are now after 13 days we observer suddenly in nginx logs this in an
> intempestive manner, and causing nginx to reload, causing slow down on
> server : posix_memalign(16, 16384) failed (12: Cannot allocate memory)
>
> This happens after our upgrade to last nginx version through nDeploy.
>
> I called in nginx sysadmin, Ndeploy sysadmin too, and finally cloudlinux
> support which made an incredible job investigating the issue over 7 days by
> enabling multiple kernel debug tools to find out what is going on.
>
> All nginx/linux settings has been tweaked/verified. Issue can't be solved,
> and about 5 guys has broken their head on the issue, without being able to
> solve. We know all the basic, even advanced, and experts were in.

Just a basic hint, in case you haven't tried it yet: re-compile
nginx without any 3rd party modules, and check if it helps.

> Cloudlinux support says this is the cause, and you need nginx expert to find
> out why nginx beheave likes this :
>
> From the information we collected it appears that nginx is really changing
> his ulimits:
> # grep nginx /home/abackupnomem3.log | tail
> nginx-792752 [009] 5438179.898678: setrlimit: (sys_setrlimit+0x63/0x70
>
> Conclusion is that nginx manage those rlimits. This is not a solution, but a
> way for you where to dig more.

The setrlimit() call is used by nginx to manage some limits it
knows about and configured to manage. In particular, it is used
for the

worker_rlimit_nofile 50000;

directive as seen in your config, and for the worker_rlimit_core
directive. Details about the directives can be found here:

http://nginx.org/r/worker_rlimit_core
http://nginx.org/r/worker_rlimit_nofile

They set RLIMIT_CORE and RLIMIT_NOFILE limits, nothing more, and
have nothing to do with the memory allocation errors you see.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 23, 2016 05:20AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 23, 2016 06:42AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 23, 2016 07:36AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 23, 2016 07:39AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

Maxim Dounin September 23, 2016 12:10PM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 23, 2016 02:03PM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 24, 2016 02:10PM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 25, 2016 05:46AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 26, 2016 03:28AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 26, 2016 04:24AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 26, 2016 04:27AM

Re: posix_memalign(16, 16384) failed (12: Cannot allocate memory)

JohnCarne September 26, 2016 06:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
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