Dram

Рейтинг
1115
Регистрация
28.06.2008

Кажется понял - крон виноват

root@Debian-93-stretch-64-minimal ~ # ps -ef | awk '{ print $8 }' | sort -n | uniq -c | sort -n | tail -5
8 /usr/sbin/apache2
12 [bioset]
42 /usr/bin/php
43 /usr/sbin/CRON
44 /bin/sh

есть там у меня задачка одна... всего одна... не думал что она так нагружать будет

Да, поднялся до прошлых пиков... думаю вот вот упадет (зависнет).

Команда top пишет

Tasks: 228 total, 1 running, 215 sleeping, 12 stopped, 0 zombie

Я не пойму - откуда 228 процессов??? на сервере два тестовых сайта и нет трафика. Досса (парсинга нет) - аксецц лог спокойный.

P.S. посмотрел на боевом сервере где все сайты у меня - там всего 170 процессов

png 4564564564.png

Вот что показывает htop - куча процессов в статусе SLEEP

jpg 45645646.jpg
LEOnidUKG:
смотреть nginx access log

первое что я глянул... идет обычные запросы, ничего интрегующего... а потом бац.... и типа нет связи....

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
Всего: 6928