Server lahmt bei db anfagen über php
Server lahmt bei db anfagen über php
Hallo,
ich betreibe einen Root-Server unter SUSE9 mit Confixx3.
Seit der Umstellung auf dieses System laufen einige PHP Scripte extrem langsam.
1.Bsp.
auf meiner Startseite habe ich ein script eingebunden welches eine Suchanfrage an Google sendet (suche dauert teilweise 20 sec.)
Unter Suse 8.1 mit confixx 2 dauerte die Suche ca. 0.2 sec
2.Bsp.
ich biete Kostenlosen Webspace an wobei das Script von einem verzeichniss in ein anderes umleitet (zwecks werbung und dateitypen einschrenkung)
Ladezeit der webseiten nach der systemumstellung LANGE
Hat jemand von euch eine Idee woran das liegen könnte ?
Register_globals = On
PHP safe mode = Off (in php.ini und conixx-vhost.conf)
bin stark am verzweifeln :(
besten Dank im voraus
best greets
Andy
ich betreibe einen Root-Server unter SUSE9 mit Confixx3.
Seit der Umstellung auf dieses System laufen einige PHP Scripte extrem langsam.
1.Bsp.
auf meiner Startseite habe ich ein script eingebunden welches eine Suchanfrage an Google sendet (suche dauert teilweise 20 sec.)
Unter Suse 8.1 mit confixx 2 dauerte die Suche ca. 0.2 sec
2.Bsp.
ich biete Kostenlosen Webspace an wobei das Script von einem verzeichniss in ein anderes umleitet (zwecks werbung und dateitypen einschrenkung)
Ladezeit der webseiten nach der systemumstellung LANGE
Hat jemand von euch eine Idee woran das liegen könnte ?
Register_globals = On
PHP safe mode = Off (in php.ini und conixx-vhost.conf)
bin stark am verzweifeln :(
besten Dank im voraus
best greets
Andy
Re: Server lahmt bei db anfagen über php
Code: Select all
ps auxfPayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
hilft das ?
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 620 252 ? S 13:49 0:05 init [3]
root 2 0.0 0.0 0 0 ? SW 13:49 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SWN 13:49 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? SW 13:49 0:00 [kswapd]
root 5 0.0 0.0 0 0 ? SW 13:49 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? SW 13:49 0:00 [kupdated]
root 7 0.0 0.0 0 0 ? SW 13:49 0:00 [pagebufd]
root 8 0.0 0.0 0 0 ? SW 13:49 0:00 [xfslogd/0]
root 9 0.0 0.0 0 0 ? SW 13:49 0:00 [xfsdatad/0]
root 11 0.0 0.0 0 0 ? SW 13:49 0:00 [kjournald]
root 56 0.0 0.0 0 0 ? SW 13:49 0:00 [xfssyncd]
root 57 0.0 0.0 0 0 ? SW 13:49 0:00 [xfssyncd]
root 58 0.0 0.0 0 0 ? SW 13:49 0:00 [xfssyncd]
root 423 0.0 0.2 1528 548 ? S 13:49 0:00 /sbin/dhcpcd -d -N -Y -t 999999 eth0
root 489 0.0 0.2 1560 624 ? S 13:49 0:00 /sbin/syslogd -a /var/lib/named/dev/log
root 492 0.0 0.5 2336 1392 ? S 13:49 0:00 /sbin/klogd -c 1 -2
root 535 0.0 0.4 4136 1068 ? S 13:49 0:00 /usr/sbin/saslauthd -a pam
root 540 0.0 0.5 4456 1404 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 541 0.0 0.4 4136 1068 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 542 0.0 0.4 4136 1068 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 543 0.0 0.4 4136 1068 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 549 0.0 0.4 2460 1092 ? S 13:49 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=/var/lib/my
mysql 586 0.0 1.4 22360 3636 ? S 13:49 0:00 _ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --u
mysql 596 0.0 1.4 22360 3636 ? S 13:49 0:00 _ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql
mysql 597 0.0 1.4 22360 3636 ? S 13:49 0:00 _ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/m
root 587 0.0 0.7 5024 1760 ? S 13:49 0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root 5158 0.0 0.9 8000 2444 ? S 17:13 0:00 _ sshd: root@pts/0
root 5169 0.2 0.6 3000 1728 pts/0 S 17:14 0:00 _ -bash
root 5191 0.0 0.3 2856 840 pts/0 R 17:14 0:00 _ ps auxf
root 701 0.0 0.3 2172 880 ? S 13:49 0:00 /usr/sbin/xinetd
spamd 764 0.0 8.8 24196 22012 ? S 13:50 0:01 /usr/sbin/spamd -x -q -d -a -u spamd -H /var/lib/spamd
root 781 0.0 0.5 4168 1344 ? S 13:50 0:00 /usr/lib/postfix/master
postfix 3963 0.0 0.5 4204 1360 ? S 16:05 0:00 _ pickup -l -t fifo -u
postfix 3964 0.0 0.5 4224 1396 ? S 16:05 0:00 _ qmgr -l -t fifo -u
ntp 798 0.0 0.8 2192 2184 ? SL 13:50 0:00 /usr/sbin/ntpd -p /var/lib/ntp/var/run/ntp/ntpd.pid -U ntp -T /v
root 844 0.0 0.2 1708 704 ? S 13:50 0:00 /usr/sbin/cron
root 5164 0.0 0.0 0 0 ? Z 17:14 0:00 _ [cron] <defunct>
root 848 0.0 0.2 1692 636 tty1 S 13:50 0:00 /sbin/mingetty --noclear tty1
root 849 0.0 0.2 1692 636 tty2 S 13:50 0:00 /sbin/mingetty tty2
root 850 0.0 0.1 1492 488 ttyS0 S 13:50 0:00 /sbin/agetty -L ttyS0 57600 vt100
root 851 0.0 4.4 26964 11132 ? S 13:50 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
root 852 0.0 0.5 3312 1356 ? S 13:50 0:00 _ /usr/bin/perl /root/confixx/pipelog.pl
root 858 0.0 4.4 26904 11064 ? S 13:50 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5145 0.0 4.5 27100 11256 ? S 17:12 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5146 0.0 4.5 26964 11160 ? S 17:12 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5157 0.0 4.5 26964 11160 ? S 17:13 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5160 0.0 4.5 26964 11160 ? S 17:13 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5162 0.0 4.5 26964 11160 ? S 17:13 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5188 0.0 4.5 26964 11160 ? S 17:14 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
root 1 0.0 0.1 620 252 ? S 13:49 0:05 init [3]
root 2 0.0 0.0 0 0 ? SW 13:49 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SWN 13:49 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? SW 13:49 0:00 [kswapd]
root 5 0.0 0.0 0 0 ? SW 13:49 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? SW 13:49 0:00 [kupdated]
root 7 0.0 0.0 0 0 ? SW 13:49 0:00 [pagebufd]
root 8 0.0 0.0 0 0 ? SW 13:49 0:00 [xfslogd/0]
root 9 0.0 0.0 0 0 ? SW 13:49 0:00 [xfsdatad/0]
root 11 0.0 0.0 0 0 ? SW 13:49 0:00 [kjournald]
root 56 0.0 0.0 0 0 ? SW 13:49 0:00 [xfssyncd]
root 57 0.0 0.0 0 0 ? SW 13:49 0:00 [xfssyncd]
root 58 0.0 0.0 0 0 ? SW 13:49 0:00 [xfssyncd]
root 423 0.0 0.2 1528 548 ? S 13:49 0:00 /sbin/dhcpcd -d -N -Y -t 999999 eth0
root 489 0.0 0.2 1560 624 ? S 13:49 0:00 /sbin/syslogd -a /var/lib/named/dev/log
root 492 0.0 0.5 2336 1392 ? S 13:49 0:00 /sbin/klogd -c 1 -2
root 535 0.0 0.4 4136 1068 ? S 13:49 0:00 /usr/sbin/saslauthd -a pam
root 540 0.0 0.5 4456 1404 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 541 0.0 0.4 4136 1068 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 542 0.0 0.4 4136 1068 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 543 0.0 0.4 4136 1068 ? S 13:49 0:00 _ /usr/sbin/saslauthd -a pam
root 549 0.0 0.4 2460 1092 ? S 13:49 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=/var/lib/my
mysql 586 0.0 1.4 22360 3636 ? S 13:49 0:00 _ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --u
mysql 596 0.0 1.4 22360 3636 ? S 13:49 0:00 _ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql
mysql 597 0.0 1.4 22360 3636 ? S 13:49 0:00 _ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/m
root 587 0.0 0.7 5024 1760 ? S 13:49 0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root 5158 0.0 0.9 8000 2444 ? S 17:13 0:00 _ sshd: root@pts/0
root 5169 0.2 0.6 3000 1728 pts/0 S 17:14 0:00 _ -bash
root 5191 0.0 0.3 2856 840 pts/0 R 17:14 0:00 _ ps auxf
root 701 0.0 0.3 2172 880 ? S 13:49 0:00 /usr/sbin/xinetd
spamd 764 0.0 8.8 24196 22012 ? S 13:50 0:01 /usr/sbin/spamd -x -q -d -a -u spamd -H /var/lib/spamd
root 781 0.0 0.5 4168 1344 ? S 13:50 0:00 /usr/lib/postfix/master
postfix 3963 0.0 0.5 4204 1360 ? S 16:05 0:00 _ pickup -l -t fifo -u
postfix 3964 0.0 0.5 4224 1396 ? S 16:05 0:00 _ qmgr -l -t fifo -u
ntp 798 0.0 0.8 2192 2184 ? SL 13:50 0:00 /usr/sbin/ntpd -p /var/lib/ntp/var/run/ntp/ntpd.pid -U ntp -T /v
root 844 0.0 0.2 1708 704 ? S 13:50 0:00 /usr/sbin/cron
root 5164 0.0 0.0 0 0 ? Z 17:14 0:00 _ [cron] <defunct>
root 848 0.0 0.2 1692 636 tty1 S 13:50 0:00 /sbin/mingetty --noclear tty1
root 849 0.0 0.2 1692 636 tty2 S 13:50 0:00 /sbin/mingetty tty2
root 850 0.0 0.1 1492 488 ttyS0 S 13:50 0:00 /sbin/agetty -L ttyS0 57600 vt100
root 851 0.0 4.4 26964 11132 ? S 13:50 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
root 852 0.0 0.5 3312 1356 ? S 13:50 0:00 _ /usr/bin/perl /root/confixx/pipelog.pl
root 858 0.0 4.4 26904 11064 ? S 13:50 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5145 0.0 4.5 27100 11256 ? S 17:12 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5146 0.0 4.5 26964 11160 ? S 17:12 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5157 0.0 4.5 26964 11160 ? S 17:13 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5160 0.0 4.5 26964 11160 ? S 17:13 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5162 0.0 4.5 26964 11160 ? S 17:13 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 5188 0.0 4.5 26964 11160 ? S 17:14 0:00 _ /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Re: Server lahmt bei db anfagen über php
1.) PHP-Script absichern (register_globals = off)
2.) PHP-Script optimieren (Querys reduzieren)
3.) mod_php gegen PHP-CGI austauschen
4.) prefork-MPM gegen worker-MPM austauschen
2.) PHP-Script optimieren (Querys reduzieren)
3.) mod_php gegen PHP-CGI austauschen
4.) prefork-MPM gegen worker-MPM austauschen
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
gibt es auch eine einfachere lösung?
1.) PHP-Script absichern (register_globals = off)
2.) PHP-Script optimieren (Querys reduzieren)
3.) mod_php gegen PHP-CGI austauschen
4.) prefork-MPM gegen worker-MPM austauschen
mit register_globals = off läuft das script nicht.
mod_php gegen PHP-CGI austauschen ? gibt es dazu ein docu und muss ich dann die scripte umschreiben ?
prefork-MPM gegen worker-MPM austauschen. :oops: damit kann ich leider nichts anfangen :oops:
besten Dank
Andy
2.) PHP-Script optimieren (Querys reduzieren)
3.) mod_php gegen PHP-CGI austauschen
4.) prefork-MPM gegen worker-MPM austauschen
mit register_globals = off läuft das script nicht.
mod_php gegen PHP-CGI austauschen ? gibt es dazu ein docu und muss ich dann die scripte umschreiben ?
prefork-MPM gegen worker-MPM austauschen. :oops: damit kann ich leider nichts anfangen :oops:
besten Dank
Andy
Re: Server lahmt bei db anfagen über php
Naja PHP-CGI bzw. su_php zu benutzten ist auch wenig förderlich für die Performance und nur notwendig wenn man mehrere "kunden" auf der Maschine hat. Ansonsten ist mod_php schon okay. Worker bzw. Leader MPM ist dagegen schon empfehlenswert. Einfach das passende SuSE Paket installieren.
Re: gibt es auch eine einfachere lösung?
Hallo,
Gruß, Wolfgang
reparieren oder entsorgen, aber nicht einfach Sicherheitsloch reinkonfigurieren.andy1978 wrote:mit register_globals = off läuft das script nicht.
Gruß, Wolfgang
bin zu blöd
hallo,
worker-mpm ist nun installiert.
Irgendwas bremst die Scripte aus und ich weis nicht was
Ich arbeite erst seit ein paar wochen mit dem root-server
bitte helft mit so das es ein idiot verstehen kann :oops:
Danke
worker-mpm ist nun installiert.
Irgendwas bremst die Scripte aus und ich weis nicht was
Ich arbeite erst seit ein paar wochen mit dem root-server
bitte helft mit so das es ein idiot verstehen kann :oops:
Danke
Re: Server lahmt bei db anfagen über php
check doch mal mir microtime an welcher stelle dein script hängt. vielleicht läuft ja ne schleife zu oft durch oder inner "langen" schleife wird ne größere SQL Abfrage gemacht.
kannst ja mal Ergebnisse posten
kannst ja mal Ergebnisse posten
Re: Server lahmt bei db anfagen über php
eventuell könnt ihr mich besser verstehen, wenn ihr es selbst seht.
das suchmaschinen-script läuft auf
http://m-host.de
das suchmaschinen-script läuft auf
http://m-host.de
