Я столкнулся со странной проблемой с Magento Store. Сервер падал, когда у нас был небольшой пик трафика, поэтому я проверил, что происходит. Используя htop, я обнаружил, что PHP5 CGI использует до 100% ЦП за одно обращение. Я использую vps, но ресурсов должно хватить на один удар. Поскольку я использую Magento, я думаю (надеюсь), что PHP написан неплохо, но я действительно не знаю. Я также использую лак в качестве кеша, поэтому Apache работает на порту 8080, но это не имеет особого значения.
ОС - Ubuntu 12.04.5 LTS
Мой вопрос: как я могу отследить причину этого? Что такое хороший и систематический подход к поиску виновника?
Это последние записи в моем журнале ошибок Apache. Я не увидел ничего слишком необычного.
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Apr 28 16:38:54 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Apr 28 16:38:54 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 28 16:38:54 2015] [notice] Digest: done
[Tue Apr 28 16:38:54 2015] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Tue Apr 28 16:38:54 2015] [error] python_init: Python executable found '/usr/bin/python'.
[Tue Apr 28 16:38:54 2015] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Tue Apr 28 16:38:54 2015] [notice] mod_python: Creating 8 session mutexes based on 40 max processes and 0 max threads.
[Tue Apr 28 16:38:54 2015] [notice] mod_python: using mutex_directory /tmp
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:38:54 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Apr 28 16:38:54 2015] [notice] Apache/2.2.22 (Ubuntu) DAV/2 mod_fcgid/2.3.6 mod_python/3.3.1 Python/2.7.3 mod_ssl/2.2.22 OpenSSL/1.0.1 mod_perl/2.0.5 Perl/v5.14.2 configured -- resuming normal operations
[Tue Apr 28 16:39:07 2015] [notice] caught SIGTERM, shutting down
[Tue Apr 28 16:39:09 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:39:09 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:39:09 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:39:09 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:39:09 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Apr 28 16:39:09 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Apr 28 16:39:09 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Apr 28 16:39:09 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 28 16:39:09 2015] [notice] Digest: done
Это результат $ top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6452 someuser 20 0 323m 78m 9136 R 85 0.5 0:08.91 php5-cgi
6456 someuser 20 0 296m 52m 9144 R 65 0.3 0:07.14 php5-cgi
6454 someuser 20 0 294m 50m 9232 S 62 0.3 0:07.43 php5-cgi
6448 someuser 20 0 0 0 0 Z 49 0.0 0:13.56 php5-cgi <defunct>
6446 someuser 20 0 0 0 0 Z 43 0.0 0:29.30 php5-cgi <defunct>
Я могу предоставить вам дополнительную информацию, но на данный момент я просто не знаю, с чего начать.
Спасибо!