Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
07-24-2012, 12:09 AM #1
- Join Date
- Oct 2011
- Thanked 1 Time in 1 Post
Desperate help configuring server with High Traffic website - 300 hits per minute
Hi guys i run a festival timetable website where people visit to check the correct times every day for a specific hour of the day. The website only reaches its peak for the 1 month every year.
For the last 4 years i've always moved my site from a shared server onto a dedicated server just before the festival starts. The dedicated server is good but it keeps on crashing due to the enormous hits reaching thousands within minutes.
Now my host is great but i think they're somtimes not up-to-speed with a few things - this is where i need your help.
Ok so my server was crippling and timing out with 500 Internal server errors, website showing just a blank white page. So my server was tweaked to the following settings:
wait_timeout = 25
interactive_timeout = 25
connect_timeout = 25
I tried accessing the site from my phone or another computer it would not load, it's as if the website was cached onto my local computer hence why it was loading fine for me. From other new connections, friends computers and phone it would load so slow with the website looking broken and images and things all over the place not fully loaded.
So i explained to support staff that only i and a few others can view the website, but not new visitors. I even tried accessing the site via a proxy browser and it would not load, so the support staff tweaked the server down slightly which fixed the problem a l. This was her response:
On further checking, the MaxClients value set in Apache configuration exceeded the limit.
root@host [~]# grep MaxClients /usr/local/apache/logs/error_log
[Thu Jul 19 10:08:13 2012] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Thu Jul 19 14:31:15 2012] [error] server reached MaxClients setting, consider raising the MaxClients setting
We have increased MaxClients from 256 to 300 in Apache configuration file. Then I have enabled KeepAlive directive to reduce the number of Apache connections in the server. Also, I have reduced MaxRequestsPerChild from 10000 to 1000.
MaxRequestsPerChild 10000 to 1000
Timeout 300 to 30
Then I fine tuned following Mysql variables in the server.
1. thread_cache_size from 32 to 16
2. table_cache from 1800 to 1024
The load average in the server is fine. I am monitoring the server and shall keep you posted."
I then asked for Nginx to be installed installed which didnt make a huge difference, I was asked by somebody to ask my host whether I had php-fpm and nginx as proxy this was my hosts response.
"You don't have php-fpm, your PHP is set to run as Apache module which is the fastest method.
Yes, nginx is setup as reverse proxy on your system - it accepts all incoming requests, it handles static files on its own by reading them directly from the filesystem and it passes requests to dynamic content back to Apache web server which generates the content and return it to nginx for further delivery."
Because i was still having problems for the website to load, the "max number of idle processes" were increased so my new config became:
Apache config changes:
nginx config changes:
comment out the "disable_symlinks if_not_owner;" line.
The website loads fine off peak, on average i receive upto 70k thats 70 thousand hits per day, with 1 hour being the most busiest. The website counter display's a few thousand current visitors viewing the website, this is displayed for the last 2 hours.
Even with a dedicted quad core server and nginx installed my website doesnt seem to be able to cope with the basic of traffic? My host seem to be exhausted not so sure what to do and i'm now left in limbo desperately trying to tweak my server for the peak hour which i receive once every day.
I have Munin server monitor installed, i am happy to show you screen grabs if anybody can help. I really dont know a great deal about managing servers and am desperately in need of help.
I would really appreciate if somebody could shed some light and put me out of my misery.
Many thanks and i hope to hear from somebody soon.
07-25-2012, 03:43 PM #2
- Join Date
- Jul 2012
- Thanked 0 Times in 0 Posts
Hm...thats difficult. Let me check it in one-two days i ll reply to you.