Dram

Рейтинг
1114
Регистрация
28.06.2008
Sitealert:
Осмелюсь спросить, а в настройках PHP выставлено max_execution_time?

max_execution_time = 30

Угу, значит нужно курить конфиг Nginx ?

но там все стандартно...

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 1024;
use epoll;
multi_accept on;
}

http {

Аналогично ведет себя и график Processes

png processes-day.png

хм... т.е. это входящие подключения, можно сказать 240 юзеров онлайн, можно провести такую аналогию?

Но в конфиге мускуля я уже и так опустил все ниже плинтуса

max_connections = 20

Спасибо, решил последовать правилу - работает не лезь.... :))

Что-то не получается... :(

root@m ~ # apt-get update && apt-get -y dist-upgrade && apt-get -y autoremove --purge && service nginx restart
Ign:1 http://mirror.hetzner.de/debian/packages stretch InRelease
Hit:2 http://mirror.hetzner.de/debian/packages stretch-updates InRelease
Hit:3 http://mirror.hetzner.de/debian/packages stretch-backports InRelease
Hit:4 http://mirror.hetzner.de/debian/security stretch/updates InRelease
Hit:5 http://security.debian.org stretch/updates InRelease
Ign:6 http://deb.debian.org/debian stretch InRelease
Hit:7 http://mirror.hetzner.de/debian/packages stretch Release
Hit:8 http://deb.debian.org/debian stretch-updates InRelease
Hit:9 http://deb.debian.org/debian stretch Release
Hit:10 https://packages.sury.org/php stretch InRelease
Hit:11 http://nginx.org/packages/debian stretch InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libnginx-mod-http-dav-ext : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-http-echo : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-http-geoip : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-http-image-filter : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-http-subs-filter : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-http-upstream-fair : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-http-xslt-filter : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-mail : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
libnginx-mod-stream : Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
nginx-full : Depends: libnginx-mod-http-auth-pam (= 1.10.3-1+deb9u1) but it is not installed
Depends: nginx-common (= 1.10.3-1+deb9u1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


root@m ~ # apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libnginx-mod-http-auth-pam nginx-common
Suggested packages:
fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
libnginx-mod-http-auth-pam nginx-common
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 190 kB of archives.
After this operation, 342 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://deb.debian.org/debian stretch/main amd64 nginx-common all 1.10.3-1+deb9u1 [104 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 libnginx-mod-http-auth-pam amd64 1.10.3-1+deb9u1 [85.8 kB]
Fetched 190 kB in 0s (4,913 kB/s)
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 50116 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.10.3-1+deb9u1_all.deb ...
Unpacking nginx-common (1.10.3-1+deb9u1) ...
Selecting previously unselected package libnginx-mod-http-auth-pam.
Preparing to unpack .../libnginx-mod-http-auth-pam_1.10.3-1+deb9u1_amd64.deb ...
Unpacking libnginx-mod-http-auth-pam (1.10.3-1+deb9u1) ...
Setting up nginx-common (1.10.3-1+deb9u1) ...
Processing triggers for systemd (232-25+deb9u4) ...
Setting up libnginx-mod-http-auth-pam (1.10.3-1+deb9u1) ...
Processing triggers for nginx-full (1.10.3-1+deb9u1) ...
Triggering nginx reload ...


root@m ~ # apt-get update && apt-get -y dist-upgrade && apt-get -y autoremove --purge && service nginx restart
Ign:1 http://mirror.hetzner.de/debian/packages stretch InRelease
Hit:2 http://mirror.hetzner.de/debian/packages stretch-updates InRelease
Hit:3 http://mirror.hetzner.de/debian/packages stretch-backports InRelease
Hit:4 http://mirror.hetzner.de/debian/security stretch/updates InRelease
Hit:5 http://mirror.hetzner.de/debian/packages stretch Release
Ign:6 http://deb.debian.org/debian stretch InRelease
Hit:7 http://security.debian.org stretch/updates InRelease
Hit:8 http://deb.debian.org/debian stretch-updates InRelease
Hit:9 http://deb.debian.org/debian stretch Release
Hit:10 https://packages.sury.org/php stretch InRelease
Hit:11 http://nginx.org/packages/debian stretch InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
nginx
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.


root@m ~ # nginx -v
nginx version: nginx/1.10.3

правильно я понимаю что папку /etc/nginx нужно забекапить, после обновления быстро ее перезаписать, опять рестарнтнуть и на этом все?

И еще вопрос - эта команда apt-get -y dist-upgrade не полезет обновлять пхп с 7,2 на 7,3 ?

А обновить нельзя без удаления? Чтоб даун тайм поменьше был...

oml:
Подскажите как, буду очень благодарен.

/ru/forum/comment/14885499

+ я еще добавил определение ботов без кукисов, и добавил автоблокировку особо упоротых по айпи на сутки.

+ уде на фронте, тем кто превышает заданное кол-во обращений я выдаю гугл капчу и пока не пройдкт контент не показываю.

Решение работает уже год, траф растет, поисковые боты ходят без ограничений. Все остальные боты или отсекаются сразу или ходят с большим трудом

Если ваш сайт на https + http2, то отсечь 98% ботов можно средствами nginx

Всего: 6924