MPM Prefork
Mar 13, 2008
I recompiled apache on my server but i never checked the "mpm prefork (recommended by apache)" option. So a few days ago I ask a server admin about if i needed that or not? I told him to go ahead and recompile it in there. So today I checked apache logs and got these
ar 12 20:13:51 host kernel: httpd[6806]: segfault at 000000000000000f rip 0000002a9a56287e rsp 0000007fbffff090 error 4
Mar 12 20:13:58 host kernel: httpd[6861]: segfault at 000000000000000f rip 0000002a9a56287e rsp 0000007fbffff0a0 error 4
Mar 12 20:14:03 host kernel: httpd[6804]: segfault at 000000000000000f rip 0000002a9a56287e rsp 0000007fbffff090 error 4
Mar 12 20:14:08 host kernel: httpd[6890]: segfault at 000000000000000f rip 0000002a9a56287e rsp 0000007fbffff0a0 error 4
Mar 12 20:14:12 host kernel: httpd[6776]: segfault at 000000000000000f rip 0000002a9a56287e rsp 0000007fbffff0a0 error 4
Mar 12 20:14:14 host kernel: httpd[6923]: segfault at 000000000000000f rip 0000002a9a56287e rsp 0000007fbffff090 error 4
Mar 12 20:14:57 host kernel: httpd[6955]: segfault at 000000000000000f rip 0000002a9a56287e rsp 0000007fbffff0a0 error 4
Is this related to the MPM prefork? Do you even need to check that box (mpm) to do settings like maxclient, maxchildprocess etc etc?
I did my own googling of the problem I some said it was because of php and/or hardware (ram). But that server admin guy says it's most likely the mpm prefork. Anyone have thoughts about this?
View 7 Replies
Jan 4, 2007
I'm using Plesk 8.1 on Server AMD Athon 3400, 1GB RAM. Something wrong on my server, but i don't now, how to fix it. Average load is normal, but by Task, for sometime are going up to over 250 and in this time can't anybody connect to server ( HTTP or FTP ).
By top command, i founded most of cpu press by user wwwrun, so run this command top -u wwwrun, here is result :
Quote:
Tasks: 148 total, 1 running, 143 sleeping, 0 stopped, 4 zombie
Cpu(s): 19.7% us, 1.7% sy, 0.0% ni, 76.0% id, 2.0% wa, 0.3% hi, 0.3% si
Mem: 1034860k total, 980204k used, 54656k free, 8252k buffers
Swap: 2104496k total, 149556k used, 1954940k free, 588824k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4282 wwwrun 16 0 49436 10m 4008 S 7.0 1.1 0:00.32 httpd2-prefork
4227 wwwrun 16 0 50792 11m 4372 S 4.6 1.1 0:00.52 httpd2-prefork
4908 wwwrun 16 0 51520 11m 4332 S 1.7 1.2 0:00.51 httpd2-prefork
5031 wwwrun 16 0 47752 8604 3552 S 1.3 0.8 0:00.07 httpd2-prefork
3613 wwwrun 15 0 49772 11m 4048 S 0.7 1.1 0:00.87 httpd2-prefork
3752 wwwrun 16 0 49808 11m 4140 S 0.7 1.2 0:01.41 httpd2-prefork
4860 wwwrun 16 0 46720 8040 3692 S 0.7 0.8 0:00.07 httpd2-prefork
4947 wwwrun 15 0 50448 11m 4036 S 0.7 1.2 0:00.69 httpd2-prefork
4995 wwwrun 15 0 46140 7592 3724 S 0.3 0.7 0:00.08 httpd2-prefork
22006 wwwrun 16 0 51808 5668 3836 S 0.0 0.5 0:00.32 httpd2-prefork
3710 wwwrun 16 0 51780 13m 4060 S 0.0 1.3 0:01.79 httpd2-prefork
4006 wwwrun 16 0 46516 7900 3716 S 0.0 0.8 0:00.08 httpd2-prefork
4090 wwwrun 16 0 48532 10m 3980 S 0.0 1.0 0:00.23 httpd2-prefork
4150 wwwrun 16 0 48396 9.9m 3876 S 0.0 1.0 0:00.12 httpd2-prefork
4189 wwwrun 16 0 49356 10m 3892 S 0.0 1.1 0:00.23 httpd2-prefork
4194 wwwrun 16 0 54396 15m 4844 S 0.0 1.5 0:01.95 httpd2-prefork
4195 wwwrun 15 0 49528 10m 3952 S 0.0 1.1 0:00.14 httpd2-prefork
Here is ps ax result :
Quote:
PID TTY STAT TIME COMMAND
1 ? S 0:01 init [3]
2 ? SN 0:00 [ksoftirqd/0]
3 ? S< 0:00 [events/0]
4 ? S< 0:00 [khelper]
5 ? S< 0:00 [kthread]
11 ? S< 0:00 [kacpid]
579 ? S< 0:02 [kblockd/0]
617 ? S 0:00 [pdflush]
618 ? S 0:00 [pdflush]
620 ? S< 0:00 [aio/0]
619 ? S 7:29 [kswapd0]
1213 ? S< 0:00 [kseriod]
1357 ? S< 0:00 [ata/0]
1469 ? S 0:03 [md1_raid1]
1470 ? S 0:00 [md0_raid1]
1479 ? S 0:05 [kjournald]
2387 ? S<s 0:00 /sbin/udevd --daemon --stop-exec-queue
2704 ? S< 0:00 [khubd]
2683 ? S 0:00 [shpchpd_event]
4239 ? Ss 0:00 /usr/bin/dbus-daemon --system
4754 ? Ss 0:00 /sbin/dhcpcd -C -H -D -N -t 999999 -h h850561 -c /etc
4953 ? Ss 0:00 /sbin/syslog-ng
4956 ? Ss 0:00 /sbin/klogd -c 1 -x -x
4981 ? Ss 0:00 /usr/sbin/acpid
4997 ? S 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrl
4999 ? S 0:00 /usr/sbin/courierlogger imapd
5008 ? S 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrl
5010 ? S 0:00 /usr/sbin/courierlogger imapd-ssl
5017 ? S 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrl
5022 ? S 0:00 /usr/sbin/courierlogger pop3d
5027 ? S 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrl
5030 ? S 0:00 /usr/sbin/courierlogger pop3d-ssl
5202 ? Ss 0:00 /usr/sbin/xinetd
5205 ? Ss 0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
5253 ? SLs 0:00 /usr/sbin/ntpd -p /var/lib/ntp/var/run/ntp/ntpd.pid -
5282 ? Ssl 0:01 /usr/sbin/nscd
5387 ? Ssl 0:06 /usr/sbin/named -t /var/lib/named -u named
5476 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=
5512 ? Sl 172:03 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/my
5621 ? S 0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
5623 ? S 0:00 postgres: writer process
5624 ? S 0:00 postgres: stats buffer process
5625 ? S 0:00 postgres: stats collector process
5674 ? Ss 0:01 /usr/sbin/spamd --username=popuser --daemonize --nous
5705 ? S 0:00 spamd child
5706 ? S 0:00 spamd child
5767 ? Ss 0:08 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5826 ? Ss 0:00 /usr/local/psa/admin/bin/httpsd
5830 ? S 0:10 /usr/local/psa/admin/bin/httpsd
5902 ? Ss 0:00 /usr/sbin/cron
5911 ? S 0:00 /sbin/mdadm -F /dev/md0 /dev/md1 -d 60 -m root@localh
5942 ? Ss 0:00 /usr/sbin/hald --daemon=yes --retain-privileges
5954 ? S 0:00 hald-addon-acpi
6003 ? S 0:00 /usr/sbin/powersaved -d -f /var/run/acpid.socket -v 3
6012 tty1 Ss+ 0:00 /sbin/mingetty --noclear tty1
6013 ttyS0 Ss+ 0:00 /sbin/agetty -L 57600 ttyS0
6023 ? S 0:11 /usr/local/psa/admin/bin/httpsd
14172 ? Sl 0:08 /usr/java/j2sdk1.4.2/bin/java -Djava.endorsed.dirs=/u
15676 ? S 0:00 qmail-send
15677 ? S 0:00 splogger qmail
15678 ? S 0:00 qmail-lspawn ./Maildir/
15680 ? S 0:00 qmail-rspawn
15681 ? S 0:00 qmail-clean
15812 ? Ss 0:07 /opt/drweb/drwebd -ini=/etc/drweb/drweb32.ini
21535 ? Z 0:00 [drwebd] <defunct>
21536 ? Z 0:00 [drwebd] <defunct>
21537 ? Z 0:00 [drwebd] <defunct>
21538 ? Z 0:00 [drwebd] <defunct>
22006 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
2544 ? Ss 0:00 sshd: root@pts/0
2592 pts/0 Ss 0:00 -bash
3573 ? Ss 0:00 sshd: root@notty
3587 ? Ss 0:00 /usr/lib/ssh/sftp-server
3613 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4006 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4090 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4195 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4494 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4497 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4508 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4696 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4735 ? Z 0:00 [httpd2-prefork] <defunct>
4743 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4760 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4761 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4775 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4860 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4882 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4903 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4904 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4921 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4923 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4930 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
4947 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5024 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5025 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5035 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5104 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5137 ? S 0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5143 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5146 ? S 0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5148 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5159 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5172 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5182 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5190 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5195 ? S 0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5196 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5197 ? S 0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5246 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5254 ? S 0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5255 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5262 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5324 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5331 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5333 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5336 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5337 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5378 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5394 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5432 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5438 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5503 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5508 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5570 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5574 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5575 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5593 ? S 0:00 /opt/drweb/drwebd -ini=/etc/drweb/drweb32.ini
5594 ? S 0:00 /opt/drweb/drwebd -ini=/etc/drweb/drweb32.ini
5595 ? S 0:00 /opt/drweb/drwebd -ini=/etc/drweb/drweb32.ini
5596 ? S 0:00 /opt/drweb/drwebd -ini=/etc/drweb/drweb32.ini
5600 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5605 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5606 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5611 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5612 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5613 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5614 ? S 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
5642 pts/0 R+ 0:00 ps ax
View 0 Replies
View Related
Jun 2, 2008
I've got a few machines where Apache acts really strange and curious if anyone has any suggestions. I'd love to figure this out so it can actually be deployed to a larger amount of machines and not just test instances.
- Basic Information
Apache 2.2.8 (Tried a few 2.2 versions)
PHP 5.2.6
suPHP based
Prefork Based
- Once a day at a random time Apache fails a request from remote monitoring. It comes back within a minute however is is inaccessible for that time. It sometimes gets picked up by 5 minute monitoring on the machine itself and it restarts the service obviously.
- PHP scripts fail to be killed at times resulting in memory being used. They need to be killed in order to go away.
Worker Based
- Apache can stay up forever it does not fail any requests
- PHP scripts do not get killed at a more frequent basis than in prefork. You need to `kill -9 pid` in order to get rid of the php processes.
I read about very few issues with 2.2 so I'm quite confused by this.
View 5 Replies
View Related
May 17, 2008
I'm using CPanel with Apache 2.2.x, php5 with suphp.
My server use multi processor:
Dual Quad Core E5405 with 8GB RAM.
I should use mpm worker or prefork and what's best config for? (i hosted over 200 domains)
I tried to Google about my question, someone say mpm worker is better, someone say mpm prefork is better. I dont know what's exactly. Can you advise me something?
View 2 Replies
View Related
Jul 31, 2009
I am really not familiar with MPM prefork. Should apache use MPM prefork or is there a better alternative? If yes, what would that be and how to use that alternative?
View 2 Replies
View Related
Jan 12, 2008
I'm building a new server for a predominantly php5/mysql5 website and was wondering which version of apache to put on. I know there are some issues with PHP and Apache in MPM, but what's the performance comparison between Apache 1.3 and Apache 2 Prefork?
View 4 Replies
View Related