Alexander Sheiko Blog

Утечка памяти в Apache при переконфигурировании

Категория: Компьютерное
Отправлено: 26.07.2006 21:00, Отредактировано: 18.08.2013 03:27

Долго пытался понять, почему при постоянной работе mod_cband веб сервер за неделю разрастается раз в пять. Оказывается дело в PHP, который при переконфигурировании Apache разрастается самым пошлым образом:


httpd -v
Server version: Apache/2.0.58
Server built: May 7 2006 20:48:38

httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c


Тестируем голый апач:

https://adsh.org.ua/blog/upload/apache_pb2_ani.gif



apachectl start

ps aux | grep httpd | awk '{ print $5}'
3948
3948
3948
3948
3948
3948
1508

apachectl graceful (10 раз)

ps aux | grep httpd | awk '{ print $5}'
3948
3948
3948
3948
3948
3948
1468

apachectl graceful (10 раз)

ps aux | grep httpd | awk '{ print $5}'
3948
3948
3948
3948
3948
3948
1508


Теперь подгружаем модулем текущий PHP Version 4.4.2:

https://adsh.org.ua/blog/upload/php.gif


apachectl start

ps aux | grep httpd | awk '{ print $5}'
8600
8624
8624
8624
8624
8624
1508

apachectl graceful (10 раз)

ps aux | grep httpd | awk '{ print $5}'
8892
8916
8916
8916
8916
8916
1508

apachectl graceful (10 раз)

ps aux | grep httpd | awk '{ print $5}'
9192
9216
9216
9216
9216
9216
1508


Написал баг репорт. Ответ разработчиков немного поразил: то что течёт - это нормально. Приколисты, блин =/.
Постоянная ссылка Комментарии (0)
Powered by sBLOG XHTML 1.0 Strict PHP CSS
Локальное время: 29.03.2024 09:36 GMT+2
© 2005-2024 Alexander Sheiko