LINUX.ORG.RU
ФорумAdmin

Что не нравится apache2?

 


1

2
root@vesta4:/home/nommaner# tail /var/log/apache2/error.log
[Tue Dec 10 09:15:20.383145 2019] [core:notice] [pid 10068] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 10 09:20:07.554696 2019] [mpm_prefork:notice] [pid 10068] AH00171: Graceful restart requested, doing restart
[Tue Dec 10 09:20:07.834976 2019] [:notice] [pid 10068] mod_ruid2/0.9.8 enabled
[Tue Dec 10 09:20:07.839703 2019] [mpm_prefork:notice] [pid 10068] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Tue Dec 10 09:20:07.839732 2019] [core:notice] [pid 10068] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 10 09:37:46.804371 2019] [mpm_prefork:notice] [pid 10068] AH00169: caught SIGTERM, shutting down
[Tue Dec 10 09:37:47.977644 2019] [suexec:notice] [pid 20369] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Dec 10 09:37:48.151259 2019] [:notice] [pid 20371] mod_ruid2/0.9.8 enabled
[Tue Dec 10 09:37:48.163460 2019] [mpm_prefork:notice] [pid 20371] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Tue Dec 10 09:37:48.163509 2019] [core:notice] [pid 20371] AH00094: Command line: '/usr/sbin/apache2'

В общем наблюдаю ситуацию, когда apache перестает отвечать, то есть сайты перестают открываться, при этом в top весит процесс отъедающий 100% ядра, как бы ядер много, но apache работать перестает.

Сегодня начал трабалшутинг, вот пытаюсь описать проблему



Последнее исправление: Shulman (всего исправлений: 2)

КО: Он получил SIGTERM

caught SIGTERM, shutting down

crutch_master ★★★★★
()

caught SIGTERM, shutting down

Это остановка апача по команде restart для его дальнейшего включения.

Из подозрений: неправильные права доступа на файлы на новом месте, внутренние ошибки доступа, нехватка ресурсов сервера.

Проверить нехватку ресурсов:

grep -i kill /var/log/messages | grep apache

Deleted
()
Последнее исправление: Deleted (всего исправлений: 1)

Also: настрой лимиты в конфиге апача. Зачем тебе тяжелый prefork? Может на worker или event изменишь? И подключи mod_fastcgi для обращения апача к PHP через сокет php-fpm.

Deleted
()
Последнее исправление: Deleted (всего исправлений: 1)
Ответ на: комментарий от Deleted
root@vesta4:/home/nommaner# tail -n 100 /var/log/apache2/error.log
[Wed Dec 11 05:51:12.121080 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 05:51:12.121107 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 05:57:14.862847 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 05:57:15.122207 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 05:57:15.126883 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 05:57:15.126912 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 06:06:10.987672 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 06:06:11.242123 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 06:06:11.247087 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 06:06:11.247115 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 06:21:12.141441 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 06:21:12.410180 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 06:21:12.414823 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 06:21:12.414851 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 06:26:11.571732 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 06:26:11.823864 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 06:26:11.828171 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 06:26:11.828197 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 06:35:07.856176 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 06:35:08.117073 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 06:35:08.121729 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 06:35:08.121758 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 06:46:11.213274 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 06:46:11.477037 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 06:46:11.481727 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 06:46:11.481761 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 06:53:19.672376 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 06:53:22.889147 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 06:53:22.893847 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 06:53:22.893875 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 07:01:10.468193 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 07:01:10.716140 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 07:01:10.720909 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 07:01:10.720938 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 07:06:11.809707 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 07:06:12.060310 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 07:06:12.064620 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 07:06:12.064646 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 07:10:06.614535 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 07:10:06.866132 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 07:10:06.871294 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 07:10:06.871323 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 07:27:15.515238 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 07:27:15.899893 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 07:27:15.904614 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 07:27:15.904643 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 07:52:16.218580 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 07:52:19.555414 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 07:52:19.560150 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 07:52:19.560177 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 07:56:10.188101 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 07:56:10.442609 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 07:56:10.447242 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 07:56:10.447270 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 08:10:08.932699 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 08:10:09.195697 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 08:10:09.200340 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 08:10:09.200368 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 08:17:15.318104 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 08:17:15.596735 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 08:17:15.601928 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 08:17:15.601957 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 11 08:21:11.372228 2019] [mpm_prefork:notice] [pid 23337] AH00171: Graceful restart requested, doing restart
[Wed Dec 11 08:21:11.617769 2019] [:notice] [pid 23337] mod_ruid2/0.9.8 enabled
[Wed Dec 11 08:21:11.622424 2019] [mpm_prefork:notice] [pid 23337] AH00163: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Wed Dec 11 08:21:11.622454 2019] [core:notice] [pid 23337] AH00094: Command line: '/usr/sbin/apache2'

Не слишком ли часто он пытается делать рестрт?

Shulman
() автор топика
Ответ на: комментарий от Shulman

Слишком. Ротация логов используется? Чтобы при ротации логов апач начал писать в новый лог-файл, производится graceful-рестарт. Проверь конфиг logrotate. Логгирование проходит нормально?

Deleted
()
Ответ на: комментарий от Deleted
/var/log/apache2/*.log /var/log/apache2/domains/*log {
        weekly
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        create 640 root adm
        sharedscripts
        postrotate
                /etc/init.d/apache2 reload > /dev/null || true
                [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
        endscript
        prerotate
                if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
                        run-parts /etc/logrotate.d/httpd-prerotate; \
                fi; \
        endscript
}
Shulman
() автор топика
Последнее исправление: Shulman (всего исправлений: 1)
Ответ на: комментарий от Shulman

Странное поведение. Только это не конфиг.

Deleted
()
Ответ на: комментарий от Shulman

В logrotate для apache проверяем наличие nginx.pid ? Рекомендую использовать опцию copytruncate и отключить все prerotate и postrotate скрипты.

spirit ★★★★★
()
Ответ на: комментарий от spirit

Это дефолтный скрипт vestacp.

Лучше давайте подумаем почему он так часто рестартует…

Shulman
() автор топика
Последнее исправление: Shulman (всего исправлений: 1)

Shulman, подскажите, пожалуйста, у вас получился какой-то прогресс по этому вопросу? Ровно та же проблема и логи те же, на сервере стоит Vesta и Апач время от времени падает. Буду благодарна получить любую зацепку. Спасибо!

nkizza
()
20 июня 2020 г.

Здравствуете, нашли решение?

BizonPC
()
Ответ на: комментарий от BizonPC

Очевидно, что всех вас объединяет какая-то Vesta => вот в ее багтрекер и идите.

t184256 ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.