Welcome! Log In Create A New Profile

Advanced

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

September 23, 2016 05:20AM
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.

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.


This was added : ulimit -q unlimited in etc/init.d/nginx :

start() {
echo -n $"Starting $prog: "
ulimit -n 64000
ulimit -q unlimited
daemon --pidfile=${pidfile} ${nginx} -c ${conffile}
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}


Anyone has a clue ?
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: 295
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