-1

on my web server running SMF, after maybe a day, the URL wont resolve.... but the IP address works great.

if i run

ps aux | grep apache2 | wc -l

it showed 150 + instances of apache running... the only thing i knew to do was restart apache, which fixed the problem and started apache back at around 14 instances.

if i refresh the homepage and then run

ps aux | grep apache2 | wc -l

the number creeps up by one.

I am totally clueless on what to do to fix this...

Version Information: Forum version: SMF 2.0.8 (more detailed) Current SMF version: SMF 2.0.8 GD version: 2.0 MySQL version: 5.5.37-0ubuntu0.12.04.1 Memcached: ??? PHP: 5.3.10-1ubuntu3 Server version: Apache/2.2.22 (Ubuntu)

1
  • if you refresh 30 times, do you get 44 threads or 15? perhaps I'm reading this wrong. If you get 44 threads, something is amiss. if you get 15, it would seem legit.
    – j0h
    Mar 30, 2015 at 21:24

1 Answer 1

1

Apache server use Multi-Processing Module (MPM) prefork.

According to this manual:

A single control process is responsible for launching child processes which listen for connections and serve them when they arrive. Apache always tries to maintain several spare or idle server processes, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new child processes to be forked before their requests can be served.

The number of process depend on traffic and on MaxSpareServers directive.

Once apache created a process, this will die when MaxRequestsPerChild requests have been served unless MaxRequestsPerChild is equal to 0, in this case child process never die.

So, don't worry, this is normal behavior, check your apache configuration and use mod_status to view debug information.

3
  • thanks! any thoughts on how to troubleshoot when the website stopped responding, but restarting apache2 fixed it?
    – Guardian
    Sep 11, 2014 at 21:01
  • There are a lot of reasons that can cause this kind of behaviour. I suggest to ask an other question about it and post: tcp connection status (netstat -t), resource usage (top), apache worker status (mod_status), apache log and apache configuration file.
    – Lety
    Sep 11, 2014 at 21:55
  • yes, Apache server uses MPM, but the described behaviour isn't normal. when a user refreshes a page, the process should terminate, and relaunch a new process, not just add an new process.
    – j0h
    Mar 30, 2015 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .