|
Posted by Manuel Lemos on 04/30/06 02:20
Hello,
on 04/28/2006 04:32 PM google@jfruh.com said the following:
> Yesterday, my Web host informed me that my domain was eating up a lot
> of server resources, and that PHP was the root cause. If I understand
> him right, PHP processing loads are causing Apache to fork lots of
> additional processes. He was unable to tell me whether this was a
> sudden spike or whether things had been steadily building and had
> crossed some threshhold. I upgraded both WordPress and PHPBB to their
> most recent versions in case there was some bug or vulnerability, but
> this did not solve the problem.
Usually this is caused by the excessive number of static content being
served at the same time by the Apache server that also serves PHP pages.
PHP itself is not the problem, but if you use persistent database
connections and serve many static content files that do not need
database connections, you force an exceeding number of database
connections to open needlessly. Those connections consume a lot of
memory. When the RAM is exhausted, your situation agravates until the
server crashes, if you do not have anything to limit connections.
The solutions for this are, move all static content to a multithreaded
HTTP server, like thttpd, and limit the Apache server simultaneous
clients to a reasonable value that does not exhaust your RAM. This will
protect your from eventual spikes.
Here you find more details about this:
http://www.meta-language.net/metabase-faq.html#excessive-connections
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Navigation:
[Reply to this message]
|