So I run a site that receives a high volume of traffic, but on my Dual Xeon the server load is always nice and low. The problem is, there are a LOT of users who use my service to create profile backgrounds or layouts for their MySpace profiles. All these profiles are adding up, causing Apache to have over 1000 open connections at a time.
So the issue isn't server load, but the amount of open Apache connections.
What do you think my best option for this is? I tried installing mod_throttle but not too much luck there (still new to apache configurations). This could be the same issue an image hosting type site will see. The users who are pinging the server from other locations are killing the site for users actually trying to get there, many times even impossible to reach.
Has anyone worked with this issue or know a good resolution? Is there a way to allocate X amount of Apache connections for outside usage, so the people trying to access the site will always be able to connect. I don't mind user having to wait a little longer for their hosted images to load, but I do mind having my users on the site have to wait.
You should consider separating your image/file hosting onto its own server. A dedicated file server whose sole job it is to display images will take the load off your application servers. Further, you will find you can serve a lot of image traffic from a relatively low powered server.
> Is there a way to allocate X amount of Apache connections for outside usage, so the people trying to access the site will always be able to connect.
As far as Apache is concerned, *all* usage is "outside usage." There is no way to determine an image loaded by a client due to being included on one of your own pages from one being loaded by client loading an outside page, except for the (unreliable) HTTP_REFERER request header. It's unreliable because many users, user-agents, and caching proxies block the HTTP referrer header. I also don't know if you can throttle based on that header.
If you want to provide images without greatly impacting your own site, consider hosting the images on a "fat-pipe" distributed hosting service such as akamai, or setting up a separate image server.