LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 09-24-2009, 02:30 PM   #1
EnderX
Member
 
Registered: Nov 2006
Posts: 63

Rep: Reputation: 15
Multiple httpd.conf entries in ps ax after restarting apache - is this normal?


As the title says. System is running SuSE 9.3, apache2, and, since this is where the problem was first seen, php 5.2.0.

I was receiving an out of memory error on a php script, and from some of what I saw on the net, I thought I might be able to partially free memory by restarting apache2. After I did so, I refreshed my page's window, then went to take a look at the ps ax output. I found seven copies of the following line:
Code:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Is this normal, or do I have some kind of problem on this system I need to take care of?
 
Old 09-24-2009, 02:35 PM   #2
lhorace
Member
 
Registered: Aug 2009
Distribution: Fedora
Posts: 126

Rep: Reputation: 21
can you include the output of ps ax. Second is this php code yours, try PHP Xdebug extension which can give you info, especially how much memory your script is using. Third, is this a PHP error or Apache error, when it says it's out of memory. You can increase the memory limit in php.ini file.
 
Old 09-24-2009, 04:17 PM   #3
EnderX
Member
 
Registered: Nov 2006
Posts: 63

Original Poster
Rep: Reputation: 15
Didn't save the previous run, but recreated the scenario. Contents of ps ax run:
Code:
  PID TTY      STAT   TIME COMMAND
    1 ?        S      0:00 init [5] 
    2 ?        S      0:00 [migration/0]
    3 ?        SN     0:00 [ksoftirqd/0]
    4 ?        S<     0:00 [events/0]
    5 ?        S<     0:00 [khelper]
   10 ?        S<     0:00 [kthread]
   20 ?        S<     0:00 [kacpid]
  105 ?        S<     0:04 [kblockd/0]
  151 ?        S<     0:00 [aio/0]
  150 ?        S      0:31 [kswapd0]
  744 ?        S      0:00 [kseriod]
  980 ?        S<     0:00 [ata/0]
 1093 ?        S<     0:00 [reiserfs/0]
 2183 ?        S<s    0:00 /sbin/udevd -d
 2769 ?        S      0:00 [khubd]
 3906 ?        S<     0:00 [hwscand]
 4659 ?        Ss     0:00 /usr/bin/dbus-daemon-1 --system
 4738 ?        Ss     0:04 /sbin/syslogd -a /var/lib/dhcp/dev/log -a /var/lib/named/dev/log -a /var/lib/ntp/dev/log
 4741 ?        Ss     0:00 /sbin/klogd -c 1 -2 -x
 5304 ?        S      0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql
 5419 ?        Sl     8:33 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking --port=3306 --socket=/var/lib/mysql/mysql.sock
 5445 ?        Ss     0:00 /usr/lib/openldap/slapd -h ldap:/// -u ldap -g ldap -o slp=on
 5488 ?        S      0:00 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
 5550 ?        Ss     0:00 /sbin/resmgrd
 5638 ?        Ss     0:00 /sbin/portmap
 5715 ?        Ss     0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
 5726 ?        Ss     0:36 /usr/sbin/nmbd -D -s /etc/samba/smb.conf
 5727 ?        Ss     0:00 /usr/sbin/acpid -c /etc/acpi/events.ignore
 5730 ?        Ssl    0:00 /usr/sbin/named -t /var/lib/named -u named
 5761 ?        Ss     0:00 /usr/sbin/mdnsd -f /etc/rendezvous.conf -b
 5773 ?        Ss     0:00 /usr/sbin/cupsd
 5784 ?        S      0:00 postgres: writer process                                
 5785 ?        S      0:00 postgres: stats buffer process                          
 5786 ?        S      0:00 postgres: stats collector process                       
 5861 ?        Ss     0:00 /opt/kde3/bin/kdm
 5871 ?        S      0:00 /usr/X11R6/bin/X -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-K3iSMA
 5878 ?        S      0:00 -:0              
 5883 ?        S      0:00 /usr/sbin/powersaved -d -x /usr/lib/powersave/scripts -a resmgr -v 3
 5884 ?        Ss     0:00 /usr/sbin/xinetd
 5892 ?        Ss     0:00 /usr/sbin/smbd -D -s /etc/samba/smb.conf
 5904 ?        S      0:00 /usr/sbin/smbd -D -s /etc/samba/smb.conf
 5912 ?        Ss     0:00 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
 5929 ?        SLs    0:00 /usr/sbin/ntpd -p /var/lib/ntp/var/run/ntp/ntpd.pid -u ntp -i /var/lib/ntp
 5969 ?        S      0:02 /opt/kde3/bin/kdm_greet
 6039 ?        Ssl    0:00 /usr/sbin/nscd
 6093 ?        Ss     0:00 /usr/lib/postfix/master
 6115 ?        S      0:00 qmgr -l -t fifo -u
 6116 ?        Ss     0:00 /usr/sbin/cron
 6126 ?        Ss     0:01 /usr/sbin/hald --daemon=yes
 6158 tty1     Ss+    0:00 /sbin/mingetty --noclear tty1
 6159 tty2     Ss+    0:00 /sbin/mingetty tty2
 6160 tty3     Ss+    0:00 /sbin/mingetty tty3
 6161 tty4     Ss+    0:00 /sbin/mingetty tty4
 6162 tty5     Ss+    0:00 /sbin/mingetty tty5
 6163 tty6     Ss+    0:00 /sbin/mingetty tty6
 6328 ?        S      0:00 /usr/sbin/smbd -D -s /etc/samba/smb.conf
 6488 ?        S      0:00 /usr/sbin/smbd -D -s /etc/samba/smb.conf
10722 ?        S      0:00 /usr/sbin/smbd -D -s /etc/samba/smb.conf
12176 ?        Ss     0:00 sshd: root@pts/0                                   
12179 pts/0    Ss+    0:00 -bash
12213 ?        Ss     0:00 sshd: root@pts/1                                   
12216 pts/1    Rs     0:00 -bash
12446 ?        S      0:00 [pdflush]
12498 ?        S      0:00 [pdflush]
13018 ?        S      0:00 pickup -l -t fifo -u
13051 ?        S      0:00 trivial-rewrite -n rewrite -t unix -u
13124 ?        Ss     0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
13125 ?        R      0:07 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
13126 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
13127 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
13128 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
13129 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
13133 ?        S      0:07 postgres: atuser attest 127.0.0.1(56450) idle           
13134 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
13136 pts/1    R+     0:00 ps ax
I will look into Xdebug, thank you for the suggestion. And finally, the error was a PHP memory issue; I have seen the php.ini fix for it mentioned online and will be making it. I simply was concerned when my first action seemed to spark a great number of httpd.conf entries when I only knew of one thing (my page) that should have been hitting this box.
 
Old 09-24-2009, 07:08 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
That would be normal; Apache starts as root in order to bind to restricted port 80 (& 443 if reqd), then drops privs and pre-spawns a num of child procs that actually respond to incoming queries.
The conf settings are at http://httpd.apache.org/docs/2.2/mod...reference.html, search for the word 'child'. There are a few relevant ones. You'll see them in your httpd.conf.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please amend apache conf/httpd.conf file please payjoe Linux - Newbie 7 09-21-2007 06:12 PM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 08:24 AM
Apache gripe - multiple directory listing httpd.conf smudge|lala Linux - Software 2 04-26-2007 07:52 AM
running httpd.conf without restarting apache mpower Linux - Newbie 3 03-16-2005 06:20 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 11:32 PM


All times are GMT -5. The time now is 05:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration