# Does it normal?

**URL:** <https://www.ruby-forum.com/t/does-it-normal/242809>\
**Category:** NGINX\
**Created:** [July 30, 2015, 10:07am UTC](https://www.ruby-forum.com/t/does-it-normal/242809 "2015-07-30T10:07:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [July 30, 2015, 10:07am UTC](https://www.ruby-forum.com/t/does-it-normal/242809/1 "2015-07-30T10:07:19Z")

</div>

my server info:

Processor Intel Xeon E3 1225v2  
RAM 32GB DDR3  
Disks 3 x 120 GB SSD

i run directadmin+nginx

the nginx use 14gb of 32gb and this output from server:

root 12872 0.0 38.8 12868180 12748776 ? Ss 09:35 0:00 nginx:  
master process /usr/sbin/nginx -c /etc/nginx/nginx.conf  
nginx 12873 0.0 38.8 12889524 12759540 ? S 09:35 0:00 nginx:  
worker process  
nginx 12882 0.0 38.8 12876504 12756964 ? S 09:35 0:00 nginx:  
worker process  
nginx 12883 0.0 38.8 12879652 12757656 ? S 09:35 0:00 nginx:  
worker process  
nginx 12884 0.0 38.8 12872432 12753532 ? S 09:35 0:00 nginx:  
worker process

when i do restart to nginx service it take 2min 40second to restart.  
after restart it immediately use 14gb of ram

does it normal for nginx?

Posted at Nginx Forum:

> **[does it normal?](https://forum.nginx.org/read.php?2,260644,260644#msg-260644)**
>
> my server info: Processor Intel Xeon E3 1225v2 RAM 32GB DDR3 Disks 3 x 120 GB SSD i run directadmin+nginx the nginx use 14gb of 32gb and this output from server: root 12872 0.0 38.8 12868180 12748776 ? Ss 09:35 0:00

---

<div class="post-metadata">

**Author:** ![evgeni22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7cd45c/32.png) [@evgeni22](https://www.ruby-forum.com/u/evgeni22)\
**Post date:** [July 30, 2015, 7:32pm UTC](https://www.ruby-forum.com/t/does-it-normal/242809/2 "2015-07-30T19:32:12Z")

</div>

Hello!

On Thu, Jul 30, 2015 at 04:07:05AM -0400, evgeni22 wrote:

> root 12872 0.0 38.8 12868180 12748776 ? Ss 09:35 0:00 nginx:  
> when i do restart to nginx service it take 2min 40second to restart.  
> after restart it immediately use 14gb of ram
> 
> does it normal for nginx?

No, but depending on your settings and compiled in modules it may  
be what you’ve asked it to do.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![evgeni22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7cd45c/32.png) [@evgeni22](https://www.ruby-forum.com/u/evgeni22)\
**Post date:** [July 30, 2015, 10:12pm UTC](https://www.ruby-forum.com/t/does-it-normal/242809/3 "2015-07-30T22:12:20Z")

</div>

nginx version: nginx/1.8.0  
built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)  
built with OpenSSL 1.0.1e-fips 11 Feb 2013  
TLS SNI support enabled  
configure arguments:  
–add-module=../modsecurity\_nginx-2.8.0/nginx/modsecurity --user=nginx  
–group=nginx --prefix=/usr --sbin-path=/usr/sbin  
–conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid  
–http-log-path=/var/log/nginx/access\_log  
–error-log-path=/var/log/nginx/error\_log --with-ipv6  
–without-mail\_imap\_module --without-mail\_smtp\_module  
–with-http\_ssl\_module  
–with-http\_realip\_module --with-http\_stub\_status\_module  
–with-http\_gzip\_static\_module --with-http\_dav\_module --with-cc-opt=‘’-D  
FD\_SETSIZE=32768’’

CentOS Linux release 7.1.1503

error.log  
2015/07/30 09:34:28 [notice] 12683#0: ModSecurity for nginx  
(STABLE)/2.8.0  
([http://www.modsecurity.org/](http://www.modsecurity.org/)) configured.  
2015/07/30 09:34:28 [notice] 12683#0: ModSecurity: APR compiled  
version=“1.5.1”; loaded version=“1.5.1”  
2015/07/30 09:34:28 [notice] 12683#0: ModSecurity: PCRE compiled  
version="8.20 "; loaded version=“8.20 2011-10-21”  
2015/07/30 09:34:28 [notice] 12683#0: ModSecurity: LIBXML compiled  
version=“2.9.2”  
2015/07/30 09:34:28 [notice] 12683#0: Original server signature:  
ModSecurity  
Standalone  
2015/07/30 09:34:28 [notice] 12683#0: Status engine is currently  
disabled,  
enable it by set SecStatusEngine to On.

other errors from time to time:  
kernel: grsec: From x.x.x.x: Segmentation fault occurred at  
00000000000000e0 in /usr/sbin/nginx[nginx:8031] uid/euid:993/993

SELINUX=disabled

at the moment:

- Memory used…: 13761 MB / 32067 MB
- Swap in use…: 2333 MB

service nginx reload = it doubles the ram usage.  
over a few days it use all 32gb of ram, and start with swap.

nginx.conf  
#user nginx;

# The number of worker processes is changed automatically by

CustomBuild,  
according to the number of CPU cores, if it’s set to “1”  
worker\_processes 4;  
pid /var/run/nginx.pid;  
error\_log /var/logs//nginx/error.log;

#error\_log logs/error.log notice;  
#error\_log logs/error.log info;

events {  
include /etc/nginx/nginx-events.conf;  
}

http {  
include /etc/nginx/mime.types;

# access\_log /var/log/nginx/access.log main;

```
# For user configurations not maintained by DirectAdmin. Empty by

```

default.  
include /etc/nginx/nginx-includes.conf;

```
# Supplemental configuration
include /etc/nginx/nginx-modsecurity-enable.conf;
include /etc/nginx/nginx-defaults.conf;
include /etc/nginx/nginx-gzip.conf;
include /etc/nginx/directadmin-ips.conf;
include /etc/nginx/directadmin-settings.conf;
include /etc/nginx/nginx-vhosts.conf;
include /etc/nginx/directadmin-vhosts.conf;

```

}

Average total traffic out from server is 41.1 kb/s.  
on 12 vhosts/domains.

So what do i start with to find the problem?

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,260644,260659#msg-260659](http://forum.nginx.org/read.php?2,260644,260659#msg-260659)

---

<div class="post-metadata">

**Author:** ![evgeni22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7cd45c/32.png) [@evgeni22](https://www.ruby-forum.com/u/evgeni22)\
**Post date:** [July 30, 2015, 10:39pm UTC](https://www.ruby-forum.com/t/does-it-normal/242809/4 "2015-07-30T22:39:47Z")

</div>

Hello!

On Thu, Jul 30, 2015 at 04:11:52PM -0400, evgeni22 wrote:

> –without-mail\_imap\_module --without-mail\_smtp\_module --with-http\_ssl\_module  
> version=“1.5.1”; loaded version=“1.5.1”  
> 2015/07/30 09:34:28 [notice] 12683#0: ModSecurity: PCRE compiled  
> version="8.20 "; loaded version=“8.20 2011-10-21”  
> 2015/07/30 09:34:28 [notice] 12683#0: ModSecurity: LIBXML compiled  
> version=“2.9.2”  
> 2015/07/30 09:34:28 [notice] 12683#0: Original server signature: ModSecurity  
> Standalone  
> 2015/07/30 09:34:28 [notice] 12683#0: Status engine is currently disabled,  
> enable it by set SecStatusEngine to On.

[…]

> So what do i start with to find the problem?

First of all, recompile nginx without ModSecurity.

–  
Maxim D.

> **[nginx](http://nginx.org/)**
