Глюк в php и полное удаление

12
Andreyka
На сайте с 19.02.2005
Offline
822
#11

Отредактировать конфиг и перезапустить php-fpm

А еще лучше - попросить специалиста посмотреть сервер и настроить его раз и на всегда

Не стоит плодить сущности без необходимости
R
На сайте с 22.06.2007
Offline
174
#12
Andreyka:
А еще лучше - попросить специалиста посмотреть сервер и настроить его раз и на всегда

мне так неинтересно :), не денег жалко, важно самому изучить сабж и решить проблему.

Reise добавил 15.05.2011 в 03:27

Andreyka:
Ему надо в php-fpm повысить число процессов и рестартовать

неа, не оно.

Пробовал увеличивать значения:

pm.max_children = 200

pm.start_servers = 40

pm.min_spare_servers = 10

pm.max_spare_servers = 70

pm.max_requests = 500

Не помогло, наблюдаю только рост соответствующих значений в логе, то есть уже 63 total children и растет дальше.

Так что проблема в чем-то другом.

R
На сайте с 14.02.2010
Offline
77
#13

да куда их подымать, их 47 в первом посте, а этого более чем достаточно для очень серьезной нагрузки. но они тормозят, потому и не хватает

мемкешь снести попробуйте

R
На сайте с 22.06.2007
Offline
174
#14
r0mik:
мемкешь снести попробуйте

попробовал, не помогло, точно та же сама картина.

Копаю дальше...

Reise добавил 16.05.2011 в 01:18

r0mik:
у меня есть 6 дебиан и php-fpm из dotdeb

какая конкретно версия php? У меня PHP 5.3.6.

Все таки очень похоже, что именно сборка кривая на дотдебе. Можно хотя бы обратить внимание на количество багов, заявленных в каментах ветки на дотдебе.

И кстати на линуксфоруме у человека та же проблема с той же версией php с дотдеба.

Возникает вопрос как установить php-fpm с пакетов, но не с дотдеба или с дотдеба, но другую версию хотя бы. Буду разбираться...

L
На сайте с 13.01.2011
Offline
132
#15

подключаешь sid и ставишь fpm

Контакты-icq 535609 ()
R
На сайте с 22.06.2007
Offline
174
#16
Logger:
подключаешь sid и ставишь fpm

Установил php-fpm с sid'а. Самое интересное, что не помогло. Может из-за того, что версия php та же.

php -v
PHP 5.3.6-11 with Suhosin-Patch (cli) (built: May 14 2011 20:38:43)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

tail -30 /var/log/php5-fpm.log 

[16-May-2011 21:28:14] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 62 total children
[16-May-2011 21:28:15] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 64 total children
[16-May-2011 21:28:16] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 66 total children
[16-May-2011 21:28:17] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 68 total children
[16-May-2011 21:28:18] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 70 total children
[16-May-2011 21:28:19] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 72 total children
[16-May-2011 21:28:20] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 74 total children
[16-May-2011 21:28:21] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 76 total children
[16-May-2011 21:28:22] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 78 total children
[16-May-2011 21:28:23] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 80 total children
[16-May-2011 21:28:24] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 82 total children
[16-May-2011 21:28:25] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 84 total children
[16-May-2011 21:28:26] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 86 total children
[16-May-2011 21:28:27] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 88 total children
[16-May-2011 21:28:28] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 90 total children
[16-May-2011 21:28:29] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 92 total children
[16-May-2011 21:28:30] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 94 total children
[16-May-2011 21:28:31] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 96 total children
[16-May-2011 21:28:32] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 98 total children
[16-May-2011 21:28:33] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 100 total children
[16-May-2011 21:28:34] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 102 total children
[16-May-2011 21:28:35] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 104 total children
[16-May-2011 21:28:36] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 106 total children
[16-May-2011 21:28:37] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 108 total children
[16-May-2011 21:28:38] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 110 total children
[16-May-2011 21:28:39] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 112 total children
[16-May-2011 21:28:40] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 114 total children
[16-May-2011 21:28:41] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 116 total children
[16-May-2011 21:28:42] WARNING: [pool www] seems busy (you may need to increase start_servers, or min/max_spare_servers), spawning 32 children, there are 0 idle, and 118 total children
[16-May-2011 21:28:43] WARNING: [pool www] server reached max_children setting (120), consider raising it

Игра с параметрами pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers, pm.max_requests в /etc/php5/fpm/pool.d/www.conf ни к чему не приводит. Кстати эти параметры в версии с sid'а были еще ниже по умолчанию.

Я уже не знаю что и думать. Может скажу ерунду, но неужели везде php этой версии с глюком?

V
На сайте с 01.10.2006
Offline
136
#17

У вас VDS или физический сервер? Параметры какие?

Почитайте, может поможет.

R
На сайте с 22.06.2007
Offline
174
#18

Удалось выяснить следующее: проблемы в связке php-mysql.

Нагрузку давал siege'ом.

Результаты отдачи статического файла:

Transactions:                7824 hits
Availability: 87.28 %
Elapsed time: 252.56 secs
Data transferred: 105.57 MB
Response time: 2.38 secs
Transaction rate: 30.98 trans/sec
Throughput: 0.42 MB/sec
Concurrency: 73.60
Successful transactions: 7824
Failed transactions: 1140
Longest transaction: 24.63
Shortest transaction: 0.13

Response time - это среднее время загрузки страницы. Тут 2 сек.

То есть с nginx все нормально.

Вот результаты отдачи файла <?php phpinfo(); ?>

Transactions:                7821 hits
Availability: 86.56 %
Elapsed time: 255.03 secs
Data transferred: 64.80 MB
Response time: 1.98 secs
Transaction rate: 30.67 trans/sec
Throughput: 0.25 MB/sec
Concurrency: 60.87
Successful transactions: 7821
Failed transactions: 1214
Longest transaction: 24.15
Shortest transaction: 0.09

Response time: 1.98 secs - нормальный показатель. То есть сам php, если не обращается к Mysql работает нормально.

А вот такой ужас при тестировании реальных страниц сайта, то есть тех, где срабатывает связка php-mysql:

Transactions:                1626 hits
Availability: 76.55 %
Elapsed time: 299.95 secs
Data transferred: 16.96 MB
Response time: 25.59 secs
Transaction rate: 5.42 trans/sec
Throughput: 0.06 MB/sec
Concurrency: 138.74
Successful transactions: 1626
Failed transactions: 498
Longest transaction: 32.63
Shortest transaction: 15.62

24 сек ждать загрузки страницы это конечно кошмар. Но что интересно, проблема не в нагрузке mysql на систему - по top'у все ок - по нулям, mysql не жрет ресурсов вообще. То есть где-то срабатывает задержка в самой связке php-mysql.

Кто может подсказать, что это такое?

Reise добавил 17.05.2011 в 01:05

vitich:
У вас VDS или физический сервер? Параметры какие?

Физический сервер, железо хорошее:

8-ядерный проц: Intel(R) Core(TM) i7 CPU

12 Гб памяти

...

думаю дальше не интересно.

vitich:
Почитайте, может поможет.

спасибо конечно, это мой же топик на линуксфоруме :).

R
На сайте с 22.06.2007
Offline
174
#19

Решил проблему.

Создал тестовую БД, тестовый php-скрипт с буквально несколькими командами (соединиться, выбрать данные, закрыть) и вместо ожидаемых 16 сек увидел 0.01 сек кажется.

В общем в конце концов оказалось, что проблема вообще в скриптах движка, а именно один php-файл коннектился к удаленному серверу через @file_get_contents, что давало такую задержку.

В любом случае, спасибо всем за помощь.

Andreyka
На сайте с 19.02.2005
Offline
822
#20

Вот по этому такие проблемы очень тяжело решать советами на форуме.

Это как лечить больного, по диагнозу, который он сам себе поставил.

12

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий