![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Yellowplum / 247mg
Industry Role:
Join Date: Feb 2008
Location: Nicosia, CY
Posts: 2,162
|
Apache KeepAlive On Or Off?
We are facing a very strange issue... server keep timeout randomly. Host is saying to turn off Apache keepalive. What high traffic sites do turnoff or turn on.... please advice
thanks |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
|
There is no universal solution, you simply need to try both and see what happens. Ir problem persist even after you do it, it means problem lies somewhere else.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
#Alberta51
Industry Role:
Join Date: Oct 2014
Location: USA Territory (Alberta)
Posts: 8,475
|
Which hosting is that ?
Guessing Disk failure/ corrupt ? Thinking out load ![]() I can refered you to a top Tech that know his shit around at raisonable rates. ( depending of the issue ) PM me if you want his contact he his a GFY Member and I sleep WELL the Last couple monthsssss ..
__________________
Tube - Cam - Escorts - Top List Menu Tab - Banner - Header Link - Blog Post DM me ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Bye - Left to do stuff
Industry Role:
Join Date: Feb 2013
Posts: 4,108
|
What does the logfil say? Any unexpexted service-terminations or does the session just timeout with no error code?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Yellowplum / 247mg
Industry Role:
Join Date: Feb 2008
Location: Nicosia, CY
Posts: 2,162
|
Just getting Random time out.. Host has finally found some hardware issue in RAID let see... but they keep asking to try KeepAlive Off and see... what is difference between alive on and off....
__________________
247mg.com - Indian Affiliate Program - Over 50+ Sites To Promote - Monetize Your INDIAN Traffic Today! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
|
Quote:
alive off, closes the connection as sooon as data is transmitted. so every new file load needs to start new connection, this reaches the apache max number of concurrent connections pretty fast. you have to find sweet spot and define keepalive time in seconds if thats possible. if you have too many files linked from single page, then keep alive on else keep alive off. my suggestion, hire someone talented and move everything to nginx. or use cdn to serve files., so only data fetched from DB is used by apache connections.
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Bye - Left to do stuff
Industry Role:
Join Date: Feb 2013
Posts: 4,108
|
that If it's a busy server, and if isent use all of the RAM, I see no reason to turn it off, unless there is shitty code or a bad firewall/loadbalancer/cache in front. You could set KeepAliveTimeout to 1 or 2 seconds, to test if it made a difference, but I would not turn it off |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Yellowplum / 247mg
Industry Role:
Join Date: Feb 2008
Location: Nicosia, CY
Posts: 2,162
|
We tried KeepAlive Off and all hanged and gone down and we have to switch back to KeepAlive On.
Its NATS server and track incoming hits and write to database only. Traffic comes in to site with nats affiliate code via link domain and redirect to different server with content in it. Once user click on any gallery its goes back to nats code and nats track hits and write to database and track it. The time out comes in betweek nats code link and redirect domain secure.abc.com redirect to tour.abc.com secure.abc.com is nats server and tour.abc.com is different. If we access direct secure.abc.com instead of redirect its give time out.... this is the issue
__________________
247mg.com - Indian Affiliate Program - Over 50+ Sites To Promote - Monetize Your INDIAN Traffic Today! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Bye - Left to do stuff
Industry Role:
Join Date: Feb 2013
Posts: 4,108
|
Try to set KeepAliveTimeout to one or two
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
|
ref :
https://serverfault.com/questions/55...traffic-server https://httpd.apache.org/docs/2.4/misc/perf-tuning.html Max clients 7500 Max Requests per Child 100 Keep-Alive Timeout 5 Max Keep Alive requests 768 Timeout 30 theres no single solution fits all, so you gotta try changing Keep-Alive Timeout value. and set to which works best. keep eye on logs. read this : https://bobcares.com/blog/speed-up-apache/ and this : https://www.linode.com/docs/web-serv...apache-server/ and this : https://medium.com/@sbuckpesch/apach...e-1bfecf161534 nginx uses workers too, so that might solve your issue, switching to workers mpm
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Oct 2017
Posts: 302
|
In my experience,it's safe to turn off keepalive if your site isn't loading tons of stuff dynamically(API requests). If your frontend is mostly static, then keeping the connection to the server is overkill and will use alot of memory, especially with Apache.
If you still want keepalive on, set the timeout value lower to reduce the number of simultaneous connections to your server.But a low timeout would negate the reason why keepalive is beneficial so it's best to turn it off. Eg: if you set the timeout to 30 seconds, it would mean that if the user spends more than 30 seconds on your page,he wouldn't have benefited from keepalive but having it on would use extra resources on your server...even though the user doesn't benefit. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
|
use gtmetrix
check page load time. set that value as keep alive value.
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Boomer Woffen
Industry Role:
Join Date: Nov 2003
Location: Null
Posts: 30,532
|
Nathan Phillips may be able to help
__________________
My mother said, to get things done You'd better not mess with Major Tom |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Yellowplum / 247mg
Industry Role:
Join Date: Feb 2008
Location: Nicosia, CY
Posts: 2,162
|
Host has detected RAID issue and changed. A brand new card was put in. The issue persists and raid issue.
![]()
__________________
247mg.com - Indian Affiliate Program - Over 50+ Sites To Promote - Monetize Your INDIAN Traffic Today! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Boomer Woffen
Industry Role:
Join Date: Nov 2003
Location: Null
Posts: 30,532
|
Replace it with the same exact card and firmware.
__________________
My mother said, to get things done You'd better not mess with Major Tom |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Industry Role:
Join Date: Aug 2013
Posts: 1,474
|
The rule of thumb is to have keepalive on unless the server is low on RAM. For busy databases, definitely have it on and consider upgrading RAM. The issue you're describing seems more than just Apache config.
__________________
![]() MojoHost.COM | natalie at mojohost dot com | Skype natalie.ac | Telegram @znatalie. Since 1999: 70 Adult Industry awards for Best Hosting Company and professional excellence. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Yellowplum / 247mg
Industry Role:
Join Date: Feb 2008
Location: Nicosia, CY
Posts: 2,162
|
Its E5 server with 64GB... only got NATS and it’s database in it.. waiting for peak traffic time to hit the server to see more ram effect... before its 32gb
__________________
247mg.com - Indian Affiliate Program - Over 50+ Sites To Promote - Monetize Your INDIAN Traffic Today! |
![]() |
![]() ![]() ![]() ![]() ![]() |