The Little Guy Posted March 13, 2009 Share Posted March 13, 2009 HELP! I have been getting over 11,000 file requests per hour, that means Apache is working super hard on my shared server my home page used to have 69 connections on one load, I don't know how though, I did remove some images to bring that count down. What can I do? Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/ Share on other sites More sharing options...
jackpf Posted March 13, 2009 Share Posted March 13, 2009 Idk, get another server? Or make your site crappier so no one wants to visit it? Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784038 Share on other sites More sharing options...
Daniel0 Posted March 13, 2009 Share Posted March 13, 2009 What's the big deal? I thought you had "unlimited"... Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784039 Share on other sites More sharing options...
The Little Guy Posted March 13, 2009 Author Share Posted March 13, 2009 What's the big deal? I thought you had "unlimited"... That was bandwidth... But... If I upgrade to a Private server, I get Unlimited Connections (Or what every Apache can handle). And so far for 5 days I have used this much: 508012.864 MB This much per day: 101602.573 MB And estimate of this much at the end of the month: 3149679.757 MB Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784044 Share on other sites More sharing options...
Daniel0 Posted March 13, 2009 Share Posted March 13, 2009 There is no such thing as unlimited anything, and anyone who claims to offer unlimited anything are overselling by the definition that overselling constitutes selling more than you have. Let x be DreamHost's hard disk capacity/bandwidth/requests, and let y be the amount they are selling. To satisfy the "not overselling condition" then [tex]x\geq y[/tex] [tex]\forall{x\in\mathbb{R}}, x<\infty[/tex] [tex]y = \infty \Rightarrow x < y[/tex] [tex]\therefore[/tex] DreamHost is overselling. QED. Anyone who thinks otherwise fails at math. I've said it before, and now I'll say it again. Do business with an honest host that makes it clear exactly how much you are and are not allowed to use. Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784050 Share on other sites More sharing options...
MadTechie Posted March 13, 2009 Share Posted March 13, 2009 I agree with Daniel0, theirs no such thing and unlimited, even if you bring it right down do the resources of the universe! but in anycase, the problem sounds like you need to think about the site design.. do you even have cacheing ? Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784051 Share on other sites More sharing options...
The Little Guy Posted March 13, 2009 Author Share Posted March 13, 2009 But I love my host. They are cheap, and I get lots of stuff. I can: - Modify my PHP to have custom PHP - Get lots of bandwidth - Get lots of file space - Allowed to have a file sharing site (they said so) - Install stuff - Run crons at most every minute - Lots more... Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784053 Share on other sites More sharing options...
Daniel0 Posted March 13, 2009 Share Posted March 13, 2009 Well, I guess you can replace all your files with goatse, tubgirl, et al. That should get people to go away. Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784057 Share on other sites More sharing options...
The Little Guy Posted March 13, 2009 Author Share Posted March 13, 2009 but in anycase, the problem sounds like you need to think about the site design.. do you even have cacheing ? I want to, But I don't know how to add it. And the home page rarely gets accessed (compared to: "/guest_images/....."). It is access from all my saved images. I have had 150,000 requests from there in 14 hours. Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784076 Share on other sites More sharing options...
MadTechie Posted March 13, 2009 Share Posted March 13, 2009 Check your logs to see where they are being called from you may want to update your .htaccess file to stop leaching!. if you havn't already! Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784082 Share on other sites More sharing options...
The Little Guy Posted March 13, 2009 Author Share Posted March 13, 2009 Check your logs to see where they are being called from you may want to update your .htaccess file to stop leaching!. if you havn't already! This is an image sharing site. Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784086 Share on other sites More sharing options...
MadTechie Posted March 13, 2009 Share Posted March 13, 2009 Then your going to get a ton of connections.. upgrade your server! Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784104 Share on other sites More sharing options...
premiso Posted March 13, 2009 Share Posted March 13, 2009 Shared hosting is meant for small sites. Any image hosting site is going to need space and bandwidth and connections to beat. You are going to have to dish out money or monitor the images dished out. If you want the site to pay, add ad's and or ask for donations. Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784106 Share on other sites More sharing options...
The Little Guy Posted March 13, 2009 Author Share Posted March 13, 2009 Here is what I have for cache control: <FilesMatch "\.(gif|jpeg|jpg|png|php)$"> Header set Cache-Control "max-age=29030400, public" </FilesMatch> Using cache-control, will that not make a connection to the server/Apache? Is that good? Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784113 Share on other sites More sharing options...
Daniel0 Posted March 13, 2009 Share Posted March 13, 2009 Also set a far future Expires header, configure ETags, and send a Last-Modified header. Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784114 Share on other sites More sharing options...
Daniel0 Posted March 13, 2009 Share Posted March 13, 2009 You might also want to setup load balancing between multiple servers and perhaps run a more lightweight web server such as lighttpd instead of Apache for serving static assets like those. Quote Link to comment https://forums.phpfreaks.com/topic/149300-too-many-apache-connections/#findComment-784117 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.