Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Outgrowing server - what now?



1:48 pm on May 22, 2006 (gmt 0)

10+ Year Member

Alright, basiclly I need to host a rather busy PHP/MYSQL website. Currently I have a webserver ( Dual Xeon 2.8GHz, 2GB, SCSI HD) cross connected to a database server of similar spec. I've done all optimization I could and it seems that the site is just outgrowing the server. I've got rather high server loads sometimes, sometimes services like FTP & DNS crashes, etc. The problem lies in the webserver as the database server is still fine.

So the question is, what is my next move?

Do I get some caching system? (cant use the mmCache / APC cause they frequently crashes my apache)
Do I get a better speced webserver?
Do I get 2 webservers and load balanced?
Do I get hardware load balancing or dns load balancing?
Do I get a private rack?

Note that the database server has to be somehow connected to the webservers.
Please give your opinions, thank you :)


2:10 pm on May 22, 2006 (gmt 0)

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

If you are crashing the database with that powerful a server either you are getting millions of hits, or your queries are very inefficient.

Anothe factory could be that you have severe memory leakage.

Are your connections closed after using them? Are you destroying your objects?
Have youoptimized all your queries for efficiency?
Using indexes wherever possible?

all these things cut down on the hit to the server memory.


3:30 am on May 30, 2006 (gmt 0)

5+ Year Member

Nifty problem. Gotta love success.

First, you should examine your database schema and make sure that you have all the indices you should. One index can make a world of difference.

If that doesn't save the day (or buy you more time) than consider a database upgrade. MySQL will use extra RAM for query caching. If your queries are well designed, it can save a ton of time on reads.

Next, you really shouldn't move forward without specific analysis of your systems - hardware and software. There are many directions to go to improve performance and some will work in certain situations and some won't.

If your site is filled with db reads and your pages have a ttl of a couple minutes, you might consider putting Squid in front of the web server as a reverse proxy. A single CPU with 4 GB of ram can make an enormous load with Squid.

Reveal a few more details about your website and I'll try to help.


3:34 am on May 30, 2006 (gmt 0)

5+ Year Member

Oh two more simple ideas.

Move DNS off the webserver. And remove FTP if you can. It won't save the day, but I believe that web servers should serve the web and that other servers can do the other things.

Also, 2GB might be too little for the webserver. Tune down the MaxRequests to defeat any hidden memory leaks and reduce the MaxClients and corresponding Min/MaxSpare configs. Reduce the amount of memory needed. Heck throw another 2GB in the box for grins.

I assume since it's so successful you've got budget.


Featured Threads

Hot Threads This Week

Hot Threads This Month