Nginx_Apache Hign Memory RAM

kang28ivan

Verified User
Joined
Mar 16, 2017
Messages
33
Hi
Anyone have experience like me who uses nginx_apache, he eats a lot of ram up to 20GB ram consumption?

In some cases the ram may go reduce after editing worker_processes to 2, but when build rewrite_confs config revert to default "auto"
Can anyone answer to solve?
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
158
Location
UA
Are You using latest versions? nginx up to 1.17.4 has memory allocation problems.
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
158
Location
UA
Do you have default configuration? Where you see this 20Gb consumption?
 

kang28ivan

Verified User
Joined
Mar 16, 2017
Messages
33
Do you have default configuration? Where you see this 20Gb consumption?
Yes, I use default configuration.
20Gb consumption I see on Service Monitor like a screenshot on above nginx consumption 6.11 GB after restart nginx, I not use mod security
 

kang28ivan

Verified User
Joined
Mar 16, 2017
Messages
33
connect as root, and from ssh console run:
ps aux | grep nginx
Code:
 ps aux | grep nginx
root       12343  0.0  5.2 1761980 1708084 ?     Ss   21:13   0:05 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx      97248  0.5  5.2 1761980 1709176 ?     S    22:15   0:21 nginx: worker process
nginx      97249  1.1  5.2 1761980 1709200 ?     S    22:15   0:48 nginx: worker process
nginx      97250  1.3  5.2 1761980 1709204 ?     S    22:15   0:54 nginx: worker process
root      168603  0.0  0.0 110700   900 pts/0    S+   23:22   0:00 grep --color=auto nginx
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
158
Location
UA
pmap -x PID
where PID - Process ID, in your message 97248 or 97249 or 97250
 

kang28ivan

Verified User
Joined
Mar 16, 2017
Messages
33
pmap -x PID
where PID - Process ID, in your message 97248 or 97249 or 97250
It seems like almost the whole process

Code:
446038:   nginx: worker process
Address           Kbytes     RSS   Dirty Mode  Mapping
0000000000400000     800     492       0 r-x-- nginx
00000000006c7000       4       4       4 r---- nginx
00000000006c8000     108      96      76 rw--- nginx
00000000006e3000     124      20      20 rw---   [ anon ]
0000000001fca000  869312  869308  869308 rw---   [ anon ]
00000000370ba000  836400  836376  836376 rw---   [ anon ]
00007f33aca13000   10240      76      76 rw-s- zero (deleted)
00007f33ad413000      48      20       0 r-x-- libnss_files-2.17.so
00007f33ad41f000    2044       0       0 ----- libnss_files-2.17.so
00007f33ad61e000       4       4       4 r---- libnss_files-2.17.so
00007f33ad61f000       4       4       4 rw--- libnss_files-2.17.so
00007f33ad620000      24       0       0 rw---   [ anon ]
00007f33ad719000     144       4       0 r-x-- libselinux.so.1
00007f33ad73d000    2044       0       0 ----- libselinux.so.1
00007f33ad93c000       4       4       4 r---- libselinux.so.1
00007f33ad93d000       4       4       4 rw--- libselinux.so.1
00007f33ad93e000       8       4       4 rw---   [ anon ]
00007f33ad940000      88       4       0 r-x-- libresolv-2.17.so
00007f33ad956000    2044       0       0 ----- libresolv-2.17.so
00007f33adb55000       4       4       4 r---- libresolv-2.17.so
00007f33adb56000       4       4       4 rw--- libresolv-2.17.so
00007f33adb57000       8       0       0 rw---   [ anon ]
00007f33adb59000      12       4       0 r-x-- libkeyutils.so.1.5
00007f33adb5c000    2044       0       0 ----- libkeyutils.so.1.5
00007f33add5b000       4       4       4 r---- libkeyutils.so.1.5
00007f33add5c000       4       4       4 rw--- libkeyutils.so.1.5
00007f33add5d000      56       4       0 r-x-- libkrb5support.so.0.1
00007f33add6b000    2048       0       0 ----- libkrb5support.so.0.1
00007f33adf6b000       4       4       4 r---- libkrb5support.so.0.1
00007f33adf6c000       4       4       4 rw--- libkrb5support.so.0.1
00007f33adf6d000     196       4       0 r-x-- libk5crypto.so.3.1
00007f33adf9e000    2044       0       0 ----- libk5crypto.so.3.1
00007f33ae19d000       8       8       8 r---- libk5crypto.so.3.1
00007f33ae19f000       4       4       4 rw--- libk5crypto.so.3.1
00007f33ae1a0000      12       4       0 r-x-- libcom_err.so.2.1
00007f33ae1a3000    2044       0       0 ----- libcom_err.so.2.1
00007f33ae3a2000       4       4       4 r---- libcom_err.so.2.1
00007f33ae3a3000       4       4       4 rw--- libcom_err.so.2.1
00007f33ae3a4000     868       4       0 r-x-- libkrb5.so.3.3
00007f33ae47d000    2044       0       0 ----- libkrb5.so.3.3
00007f33ae67c000      56      56      56 r---- libkrb5.so.3.3
00007f33ae68a000      12      12      12 rw--- libkrb5.so.3.3
00007f33ae68d000     296       4       0 r-x-- libgssapi_krb5.so.2.2
00007f33ae6d7000    2048       0       0 ----- libgssapi_krb5.so.2.2
00007f33ae8d7000       4       4       4 r---- libgssapi_krb5.so.2.2
00007f33ae8d8000       8       8       8 rw--- libgssapi_krb5.so.2.2
00007f33ae8da000       8       4       0 r-x-- libfreebl3.so
00007f33ae8dc000    2044       0       0 ----- libfreebl3.so
00007f33aeadb000       4       4       4 r---- libfreebl3.so
00007f33aeadc000       4       4       4 rw--- libfreebl3.so
00007f33aeadd000    1804     424       0 r-x-- libc-2.17.so
00007f33aeca0000    2048       0       0 ----- libc-2.17.so
00007f33aeea0000      16      16      16 r---- libc-2.17.so
00007f33aeea4000       8       8       8 rw--- libc-2.17.so
00007f33aeea6000      20      20      20 rw---   [ anon ]
00007f33aeeab000      84      52       0 r-x-- libz.so.1.2.7
00007f33aeec0000    2044       0       0 ----- libz.so.1.2.7
00007f33af0bf000       4       4       4 r---- libz.so.1.2.7
00007f33af0c0000       4       4       4 rw--- libz.so.1.2.7
00007f33af0c1000    2264     996       0 r-x-- libcrypto.so.1.0.2k
00007f33af2f7000    2048       0       0 ----- libcrypto.so.1.0.2k
00007f33af4f7000     112     112     112 r---- libcrypto.so.1.0.2k
00007f33af513000      52      52      52 rw--- libcrypto.so.1.0.2k
00007f33af520000      16      12      12 rw---   [ anon ]
00007f33af524000     412     280       0 r-x-- libssl.so.1.0.2k
00007f33af58b000    2048       0       0 ----- libssl.so.1.0.2k
00007f33af78b000      16      16      16 r---- libssl.so.1.0.2k
00007f33af78f000      28      28      28 rw--- libssl.so.1.0.2k
00007f33af796000     532      56       0 r-x-- libpcre.so.1.2.11
00007f33af81b000    2044       0       0 ----- libpcre.so.1.2.11
00007f33afa1a000       4       4       4 r---- libpcre.so.1.2.11
00007f33afa1b000       4       4       4 rw--- libpcre.so.1.2.11
00007f33afa1c000      32       4       0 r-x-- libcrypt-2.17.so
00007f33afa24000    2044       0       0 ----- libcrypt-2.17.so
00007f33afc23000       4       4       4 r---- libcrypt-2.17.so
00007f33afc24000       4       4       4 rw--- libcrypt-2.17.so
00007f33afc25000     184       0       0 rw---   [ anon ]
00007f33afc53000      92      44       0 r-x-- libpthread-2.17.so
00007f33afc6a000    2044       0       0 ----- libpthread-2.17.so
00007f33afe69000       4       4       4 r---- libpthread-2.17.so
00007f33afe6a000       4       4       4 rw--- libpthread-2.17.so
00007f33afe6b000      16       4       4 rw---   [ anon ]
00007f33afe6f000       8       4       0 r-x-- libdl-2.17.so
00007f33afe71000    2048       0       0 ----- libdl-2.17.so
00007f33b0071000       4       4       4 r---- libdl-2.17.so
00007f33b0072000       4       4       4 rw--- libdl-2.17.so
00007f33b0073000     136      68       0 r-x-- ld-2.17.so
00007f33b027d000      36      36      36 rw---   [ anon ]
00007f33b0292000       4       4       4 rw-s- zero (deleted)
00007f33b0293000       4       4       4 rw---   [ anon ]
00007f33b0294000       4       4       4 r---- ld-2.17.so
00007f33b0295000       4       4       4 rw--- ld-2.17.so
00007f33b0296000       4       4       4 rw---   [ anon ]
00007ffc4038d000     132      20      20 rw---   [ stack ]
00007ffc403c2000       8       8       0 r-x--   [ anon ]
ffffffffff600000       4       0       0 r-x--   [ anon ]
---------------- ------- ------- -------
total kB         1761792 1708900 1706396
Code:
446039:   nginx: worker process
Address           Kbytes     RSS   Dirty Mode  Mapping
0000000000400000     800     496       0 r-x-- nginx
00000000006c7000       4       4       4 r---- nginx
00000000006c8000     108     100      76 rw--- nginx
00000000006e3000     124      20      20 rw---   [ anon ]
0000000001fca000  869312  869308  869308 rw---   [ anon ]
00000000370ba000  836400  836368  836368 rw---   [ anon ]
00007f33aca13000   10240      96      96 rw-s- zero (deleted)
00007f33ad413000      48      20       0 r-x-- libnss_files-2.17.so
00007f33ad41f000    2044       0       0 ----- libnss_files-2.17.so
00007f33ad61e000       4       4       4 r---- libnss_files-2.17.so
00007f33ad61f000       4       4       4 rw--- libnss_files-2.17.so
00007f33ad620000      24       0       0 rw---   [ anon ]
00007f33ad719000     144       4       0 r-x-- libselinux.so.1
00007f33ad73d000    2044       0       0 ----- libselinux.so.1
00007f33ad93c000       4       4       4 r---- libselinux.so.1
00007f33ad93d000       4       4       4 rw--- libselinux.so.1
00007f33ad93e000       8       4       4 rw---   [ anon ]
00007f33ad940000      88       4       0 r-x-- libresolv-2.17.so
00007f33ad956000    2044       0       0 ----- libresolv-2.17.so
00007f33adb55000       4       4       4 r---- libresolv-2.17.so
00007f33adb56000       4       4       4 rw--- libresolv-2.17.so
00007f33adb57000       8       0       0 rw---   [ anon ]
00007f33adb59000      12       4       0 r-x-- libkeyutils.so.1.5
00007f33adb5c000    2044       0       0 ----- libkeyutils.so.1.5
00007f33add5b000       4       4       4 r---- libkeyutils.so.1.5
00007f33add5c000       4       4       4 rw--- libkeyutils.so.1.5
00007f33add5d000      56       4       0 r-x-- libkrb5support.so.0.1
00007f33add6b000    2048       0       0 ----- libkrb5support.so.0.1
00007f33adf6b000       4       4       4 r---- libkrb5support.so.0.1
00007f33adf6c000       4       4       4 rw--- libkrb5support.so.0.1
00007f33adf6d000     196       4       0 r-x-- libk5crypto.so.3.1
00007f33adf9e000    2044       0       0 ----- libk5crypto.so.3.1
00007f33ae19d000       8       8       8 r---- libk5crypto.so.3.1
00007f33ae19f000       4       4       4 rw--- libk5crypto.so.3.1
00007f33ae1a0000      12       4       0 r-x-- libcom_err.so.2.1
00007f33ae1a3000    2044       0       0 ----- libcom_err.so.2.1
00007f33ae3a2000       4       4       4 r---- libcom_err.so.2.1
00007f33ae3a3000       4       4       4 rw--- libcom_err.so.2.1
00007f33ae3a4000     868       4       0 r-x-- libkrb5.so.3.3
00007f33ae47d000    2044       0       0 ----- libkrb5.so.3.3
00007f33ae67c000      56      56      56 r---- libkrb5.so.3.3
00007f33ae68a000      12      12      12 rw--- libkrb5.so.3.3
00007f33ae68d000     296       4       0 r-x-- libgssapi_krb5.so.2.2
00007f33ae6d7000    2048       0       0 ----- libgssapi_krb5.so.2.2
00007f33ae8d7000       4       4       4 r---- libgssapi_krb5.so.2.2
00007f33ae8d8000       8       8       8 rw--- libgssapi_krb5.so.2.2
00007f33ae8da000       8       4       0 r-x-- libfreebl3.so
00007f33ae8dc000    2044       0       0 ----- libfreebl3.so
00007f33aeadb000       4       4       4 r---- libfreebl3.so
00007f33aeadc000       4       4       4 rw--- libfreebl3.so
00007f33aeadd000    1804     432       0 r-x-- libc-2.17.so
00007f33aeca0000    2048       0       0 ----- libc-2.17.so
00007f33aeea0000      16      16      16 r---- libc-2.17.so
00007f33aeea4000       8       8       8 rw--- libc-2.17.so
00007f33aeea6000      20      20      20 rw---   [ anon ]
00007f33aeeab000      84      52       0 r-x-- libz.so.1.2.7
00007f33aeec0000    2044       0       0 ----- libz.so.1.2.7
00007f33af0bf000       4       4       4 r---- libz.so.1.2.7
00007f33af0c0000       4       4       4 rw--- libz.so.1.2.7
00007f33af0c1000    2264    1012       0 r-x-- libcrypto.so.1.0.2k
00007f33af2f7000    2048       0       0 ----- libcrypto.so.1.0.2k
00007f33af4f7000     112     112     112 r---- libcrypto.so.1.0.2k
00007f33af513000      52      52      52 rw--- libcrypto.so.1.0.2k
00007f33af520000      16      12      12 rw---   [ anon ]
00007f33af524000     412     280       0 r-x-- libssl.so.1.0.2k
00007f33af58b000    2048       0       0 ----- libssl.so.1.0.2k
00007f33af78b000      16      16      16 r---- libssl.so.1.0.2k
00007f33af78f000      28      28      28 rw--- libssl.so.1.0.2k
00007f33af796000     532      88       0 r-x-- libpcre.so.1.2.11
00007f33af81b000    2044       0       0 ----- libpcre.so.1.2.11
00007f33afa1a000       4       4       4 r---- libpcre.so.1.2.11
00007f33afa1b000       4       4       4 rw--- libpcre.so.1.2.11
00007f33afa1c000      32       4       0 r-x-- libcrypt-2.17.so
00007f33afa24000    2044       0       0 ----- libcrypt-2.17.so
00007f33afc23000       4       4       4 r---- libcrypt-2.17.so
00007f33afc24000       4       4       4 rw--- libcrypt-2.17.so
00007f33afc25000     184       0       0 rw---   [ anon ]
00007f33afc53000      92      44       0 r-x-- libpthread-2.17.so
00007f33afc6a000    2044       0       0 ----- libpthread-2.17.so
00007f33afe69000       4       4       4 r---- libpthread-2.17.so
00007f33afe6a000       4       4       4 rw--- libpthread-2.17.so
00007f33afe6b000      16       4       4 rw---   [ anon ]
00007f33afe6f000       8       4       0 r-x-- libdl-2.17.so
00007f33afe71000    2048       0       0 ----- libdl-2.17.so
00007f33b0071000       4       4       4 r---- libdl-2.17.so
00007f33b0072000       4       4       4 rw--- libdl-2.17.so
00007f33b0073000     136      68       0 r-x-- ld-2.17.so
00007f33b027d000      36      36      36 rw---   [ anon ]
00007f33b0292000       4       4       4 rw-s- zero (deleted)
00007f33b0293000       4       4       4 rw---   [ anon ]
00007f33b0294000       4       4       4 r---- ld-2.17.so
00007f33b0295000       4       4       4 rw--- ld-2.17.so
00007f33b0296000       4       4       4 rw---   [ anon ]
00007ffc4038d000     132      20      20 rw---   [ stack ]
00007ffc403c2000       8       8       0 r-x--   [ anon ]
ffffffffff600000       4       0       0 r-x--   [ anon ]
---------------- ------- ------- -------
total kB         1761792 1708976 1706408
Code:
446040:   nginx: worker process
Address           Kbytes     RSS   Dirty Mode  Mapping
0000000000400000     800     492       0 r-x-- nginx
00000000006c7000       4       4       4 r---- nginx
00000000006c8000     108     100      76 rw--- nginx
00000000006e3000     124      20      20 rw---   [ anon ]
0000000001fca000  869312  869308  869308 rw---   [ anon ]
00000000370ba000  836400  836368  836368 rw---   [ anon ]
00007f33aca13000   10240      96      96 rw-s- zero (deleted)
00007f33ad413000      48      20       0 r-x-- libnss_files-2.17.so
00007f33ad41f000    2044       0       0 ----- libnss_files-2.17.so
00007f33ad61e000       4       4       4 r---- libnss_files-2.17.so
00007f33ad61f000       4       4       4 rw--- libnss_files-2.17.so
00007f33ad620000      24       0       0 rw---   [ anon ]
00007f33ad719000     144       4       0 r-x-- libselinux.so.1
00007f33ad73d000    2044       0       0 ----- libselinux.so.1
00007f33ad93c000       4       4       4 r---- libselinux.so.1
00007f33ad93d000       4       4       4 rw--- libselinux.so.1
00007f33ad93e000       8       4       4 rw---   [ anon ]
00007f33ad940000      88       4       0 r-x-- libresolv-2.17.so
00007f33ad956000    2044       0       0 ----- libresolv-2.17.so
00007f33adb55000       4       4       4 r---- libresolv-2.17.so
00007f33adb56000       4       4       4 rw--- libresolv-2.17.so
00007f33adb57000       8       0       0 rw---   [ anon ]
00007f33adb59000      12       4       0 r-x-- libkeyutils.so.1.5
00007f33adb5c000    2044       0       0 ----- libkeyutils.so.1.5
00007f33add5b000       4       4       4 r---- libkeyutils.so.1.5
00007f33add5c000       4       4       4 rw--- libkeyutils.so.1.5
00007f33add5d000      56       4       0 r-x-- libkrb5support.so.0.1
00007f33add6b000    2048       0       0 ----- libkrb5support.so.0.1
00007f33adf6b000       4       4       4 r---- libkrb5support.so.0.1
00007f33adf6c000       4       4       4 rw--- libkrb5support.so.0.1
00007f33adf6d000     196       4       0 r-x-- libk5crypto.so.3.1
00007f33adf9e000    2044       0       0 ----- libk5crypto.so.3.1
00007f33ae19d000       8       8       8 r---- libk5crypto.so.3.1
00007f33ae19f000       4       4       4 rw--- libk5crypto.so.3.1
00007f33ae1a0000      12       4       0 r-x-- libcom_err.so.2.1
00007f33ae1a3000    2044       0       0 ----- libcom_err.so.2.1
00007f33ae3a2000       4       4       4 r---- libcom_err.so.2.1
00007f33ae3a3000       4       4       4 rw--- libcom_err.so.2.1
00007f33ae3a4000     868       4       0 r-x-- libkrb5.so.3.3
00007f33ae47d000    2044       0       0 ----- libkrb5.so.3.3
00007f33ae67c000      56      56      56 r---- libkrb5.so.3.3
00007f33ae68a000      12      12      12 rw--- libkrb5.so.3.3
00007f33ae68d000     296       4       0 r-x-- libgssapi_krb5.so.2.2
00007f33ae6d7000    2048       0       0 ----- libgssapi_krb5.so.2.2
00007f33ae8d7000       4       4       4 r---- libgssapi_krb5.so.2.2
00007f33ae8d8000       8       8       8 rw--- libgssapi_krb5.so.2.2
00007f33ae8da000       8       4       0 r-x-- libfreebl3.so
00007f33ae8dc000    2044       0       0 ----- libfreebl3.so
00007f33aeadb000       4       4       4 r---- libfreebl3.so
00007f33aeadc000       4       4       4 rw--- libfreebl3.so
00007f33aeadd000    1804     432       0 r-x-- libc-2.17.so
00007f33aeca0000    2048       0       0 ----- libc-2.17.so
00007f33aeea0000      16      16      16 r---- libc-2.17.so
00007f33aeea4000       8       8       8 rw--- libc-2.17.so
00007f33aeea6000      20      20      20 rw---   [ anon ]
00007f33aeeab000      84      52       0 r-x-- libz.so.1.2.7
00007f33aeec0000    2044       0       0 ----- libz.so.1.2.7
00007f33af0bf000       4       4       4 r---- libz.so.1.2.7
00007f33af0c0000       4       4       4 rw--- libz.so.1.2.7
00007f33af0c1000    2264    1016       0 r-x-- libcrypto.so.1.0.2k
00007f33af2f7000    2048       0       0 ----- libcrypto.so.1.0.2k
00007f33af4f7000     112     112     112 r---- libcrypto.so.1.0.2k
00007f33af513000      52      52      52 rw--- libcrypto.so.1.0.2k
00007f33af520000      16      12      12 rw---   [ anon ]
00007f33af524000     412     280       0 r-x-- libssl.so.1.0.2k
00007f33af58b000    2048       0       0 ----- libssl.so.1.0.2k
00007f33af78b000      16      16      16 r---- libssl.so.1.0.2k
00007f33af78f000      28      28      28 rw--- libssl.so.1.0.2k
00007f33af796000     532      88       0 r-x-- libpcre.so.1.2.11
00007f33af81b000    2044       0       0 ----- libpcre.so.1.2.11
00007f33afa1a000       4       4       4 r---- libpcre.so.1.2.11
00007f33afa1b000       4       4       4 rw--- libpcre.so.1.2.11
00007f33afa1c000      32       4       0 r-x-- libcrypt-2.17.so
00007f33afa24000    2044       0       0 ----- libcrypt-2.17.so
00007f33afc23000       4       4       4 r---- libcrypt-2.17.so
00007f33afc24000       4       4       4 rw--- libcrypt-2.17.so
00007f33afc25000     184       0       0 rw---   [ anon ]
00007f33afc53000      92      44       0 r-x-- libpthread-2.17.so
00007f33afc6a000    2044       0       0 ----- libpthread-2.17.so
00007f33afe69000       4       4       4 r---- libpthread-2.17.so
00007f33afe6a000       4       4       4 rw--- libpthread-2.17.so
00007f33afe6b000      16       4       4 rw---   [ anon ]
00007f33afe6f000       8       4       0 r-x-- libdl-2.17.so
00007f33afe71000    2048       0       0 ----- libdl-2.17.so
00007f33b0071000       4       4       4 r---- libdl-2.17.so
00007f33b0072000       4       4       4 rw--- libdl-2.17.so
00007f33b0073000     136      68       0 r-x-- ld-2.17.so
00007f33b027d000      36      36      36 rw---   [ anon ]
00007f33b0292000       4       4       4 rw-s- zero (deleted)
00007f33b0293000       4       4       4 rw---   [ anon ]
00007f33b0294000       4       4       4 r---- ld-2.17.so
00007f33b0295000       4       4       4 rw--- ld-2.17.so
00007f33b0296000       4       4       4 rw---   [ anon ]
00007ffc4038d000     132      20      20 rw---   [ stack ]
00007ffc403c2000       8       8       0 r-x--   [ anon ]
ffffffffff600000       4       0       0 r-x--   [ anon ]
---------------- ------- ------- -------
total kB         1761792 1708976 1706408
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
158
Location
UA
hmmm.. check:
/etc/nginx/nginx_limits.conf
/etc/nginx/nginx-defaults.conf
maybe there somethig set to huge values, maybe You have proxy_cache configured?
 

kang28ivan

Verified User
Joined
Mar 16, 2017
Messages
33
hmmm.. check:
/etc/nginx/nginx_limits.conf
/etc/nginx/nginx-defaults.conf
maybe there somethig set to huge values, maybe You have proxy_cache configured?
Is the arrangement very influential?

/etc/nginx/nginx_limits.conf
Code:
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_intercept_errors on;
fastcgi_param HTTP_PROXY "";
/etc/nginx/nginx-defaults.conf
Code:
default_type  application/octet-stream;
tcp_nopush on;
tcp_nodelay on;
sendfile        on;

log_format bytes '$bytes_sent $request_length';

keepalive_timeout  15;
types_hash_max_size 2048;

disable_symlinks if_not_owner from=$document_root;

server_tokens off;

client_max_body_size 512m;
client_body_buffer_size 128k;

server_names_hash_bucket_size 128;
server_names_hash_max_size 10240;

ssl_dhparam /etc/nginx/ssl.crt/dhparams.pem;

ssl_session_cache   shared:SSL:10m;
ssl_session_timeout  5m;

# https://mozilla.github.io/server-side-tls/ssl-config-generator/ intermediate configuration.
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers on;

include /etc/nginx/nginx-directoryindex.conf;
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
158
Location
UA
all looks OK. Check nginx error/access logs, maybe there are a lot of big file requestst. Maybe "lsof -p PID" will help you.
 
Top