Php5-fpm crash bei vielen besuchern

chillah

New Member
Hallo zusammen,

ich habem ich entschieden von Litespeed auf Nginx zu wechseln da ich gelesen habe das weniger resourcen verbraucht werden.

Ich verwende Nginx für Wordpress und es sind durchschnittlich ca 500 User Online.

Meine www.conf in "/etc/php5/fpm/pool.d"

Code:
pm.max_children = 200

pm.start_servers = 20

pm.min_spare_servers = 20

pm.max_spare_servers = 60

;pm.process_idle_timeout = 10s;

;pm.max_requests = 1000


Seit ich die Einstellungen erhöht habe braucht der Server länger bis er eine Blank Page anzeigt. Dann ist die CPU auslastung ziemlich niedrig ca 5 %. Wenn php fpm noch läuft schwankt diese extrem zwischen 20% und bis zu 90%

Hier die Nginx.conf:

Code:
user www-data;
worker_processes 2;
pid /var/run/nginx.pid;

events {
worker_connections 3048;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;


Hier habe ich die Worker connections auf 3k erhöht, habe aber keine Ahnung ob das richtig ist.
 
Was sagen die relevanten Logfiles denn?
Entsprechend konfiguriert ist die meiste Software recht gesprächig was Abstürze betrifft. :)
 
php5-fpm log

Code:
[03-Apr-2012 23:04:37] WARNING: [pool www] child 9761 exited with code 255 after 9.864045 seconds from start
[03-Apr-2012 23:04:37] NOTICE: [pool www] child 9782 started
[03-Apr-2012 23:04:37] WARNING: [pool www] child 9762 exited with code 255 after 9.761242 seconds from start
[03-Apr-2012 23:04:37] NOTICE: [pool www] child 9783 started
[03-Apr-2012 23:04:38] WARNING: [pool www] child 9763 exited with code 255 after 10.286961 seconds from start
[03-Apr-2012 23:04:38] NOTICE: [pool www] child 9784 started
[03-Apr-2012 23:04:39] WARNING: [pool www] child 9764 exited with code 255 after 11.019000 seconds from start
[03-Apr-2012 23:04:39] NOTICE: [pool www] child 9785 started
[03-Apr-2012 23:04:39] WARNING: [pool www] child 9765 exited with code 255 after 11.331167 seconds from start
[03-Apr-2012 23:04:39] NOTICE: [pool www] child 9786 started
[03-Apr-2012 23:04:39] WARNING: [pool www] child 9766 exited with code 255 after 10.652804 seconds from start
[03-Apr-2012 23:04:39] NOTICE: [pool www] child 9787 started
[03-Apr-2012 23:04:39] WARNING: [pool www] child 9767 exited with code 255 after 10.683414 seconds from start
[03-Apr-2012 23:04:39] NOTICE: [pool www] child 9788 started
[03-Apr-2012 23:04:39] NOTICE: Terminating ...
[03-Apr-2012 23:04:39] NOTICE: exiting, bye-bye!
[03-Apr-2012 23:04:39] NOTICE: fpm is running, pid 9796
[03-Apr-2012 23:04:39] NOTICE: ready to handle connections
[03-Apr-2012 23:05:24] NOTICE: Terminating ...
[03-Apr-2012 23:05:24] NOTICE: exiting, bye-bye!
[03-Apr-2012 23:05:51] NOTICE: fpm is running, pid 9889
[03-Apr-2012 23:05:51] NOTICE: ready to handle connections
[04-Apr-2012 00:12:49] NOTICE: Terminating ...
[04-Apr-2012 00:12:49] NOTICE: exiting, bye-bye!
[04-Apr-2012 00:12:49] NOTICE: fpm is running, pid 10072
[04-Apr-2012 00:12:49] NOTICE: ready to handle connections

Die terminates kommen vom dauerhauften restart von php fpm

Nginx log ist leer

Access Log ist 300 MB groß

helpdesk.error.log mit 50 mb.

gefüllt mit fehlenden files vom Theme
 
pm = dynamic
pm.max_children = 100
pm.start_servers = 30
pm.min_spare_servers = 20
pm.max_spare_servers = 75
pm.max_requests = 750

Versuch mal die Config.

Und in deiner NGINX Config mürde ich pro CPU Kern ein worker Process einstellen, glaube nicht das du einen Dual Core hast oder ? Bestimmt ein Quad Core dann also 4 worker.

worker_processes 4;

Teste mal und sag bescheid
 
Server ist dual core. Habe schon zig einstellungen versucht und kann sagen das es definitiv nicht daran liegt. Einige sagen das evtl ein Wordpress Plugin schuld daran ist Unendlich loop etc. Gibts da eine möglichkeit das Script nach solchen loops zu durchsuchen? Plugins habe ich nur noch die nötigsten an:

Capability Manager
Category Images II
Category Tags
HeadSpace2
More Fields
Multi Column Category List
PHPFreeChat
Post Tabs
ProPlayer
Sort Query Posts
Taxonomy Images
W3 Total Cache
WP-Mail-SMTP
WP-PageNavi
WP-ReportPost
WP Paging

Aktivierte (17)
 
Hast du den W3 Total Cache auch für NGINX eingerichtet ?

Ansonsten deaktiviere das mal.

Mal eine Sub Domain und installiere ein normalen Wordpress ist das Problem reproduzierbar ?
 
Back
Top