• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Keep Alive

DRE

Well-known member
#1
What is Keep Alive? WebPageTest.org says I don't have Keep Alive Enabled.

http://www.webpagetest.org/result/140216_WC_3GF/

Xenforo 1.3 Beta 3.

All addons disabled on my site.

No social networking integration or buttons.

No advertisements

Default theme with nearly no edits.

I asked my host and they said 'Keep alive is enabled in your server's configuration. If it's off, it's been disabled in your sites' .htaccess file, or otherwise in your code.'
 

DRE

Well-known member
#3
Just like my host said, Keep Alive is on.

Screen Shot 2014-02-16 at 5.21.39 PM.png

What on my Xenforo installation is keeping it from showing that it's enabled?
 

Null

Well-known member
#4
Just like my host said, Keep Alive is on.

View attachment 67420

What on my Xenforo installation is keeping it from showing that it's enabled?
Unless your server is under really heavy load, you should keep the Keep-Alive Timeout at 5 (default).

Can you paste your .htaccess, httpd.conf and ssl.conf? I'm guessing there's a rouge 'nokeepalive' somewhere.

Alternatively, you could try the following:
Code:
cd /etc/apache2
grep -Rni 'nokeepalive' *
 
Last edited:

DRE

Well-known member
#5
Unless your server is under really heavy load, you should keep the Keep-Alive Timeout at 5 (default).

Can you paste your .htaccess, httpd.conf and ssl.conf? I'm guessing there's a rouge 'nokeepalive' somewhere.

Alternatively, you could try the following:
Code:
cd /etc/apache2
grep -Rni 'nokeepalive' *
Code:
RewriteEngine on 
RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Sogou [NC]
RewriteRule ^.*$ - [F]
order allow,deny
deny from 18blah blah
deny from 22blah blah
allow from all

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?8th.us [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?facebook.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?twitter.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|bmp|tiff|pic|mp3|doc|xls|mpeg|mpg|ram|rm|wma|wav|asx|wmv|avi|mov|zip|rar|exe)$ http://i41.tinypic.com/2wq73lx.jpg [NC,R,L]

RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://8th.us/$1 [R,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 

DRE

Well-known member
#8
Glad I'm not the only one who is having this issue.

I've been reading a lot and I'm seeing that this Keep Alive issue is actually server related and not software related.

http://www.webpagetest.org/forums/showthread.php?tid=12624&highlight=Keep+Alive

"That means keep--alives are not really enabled. I'm partially convinced that hosting providers were doing that just so you thought it might be while still allowing them to disable it but when the browser sees that "close" it will close the connection.

The keep-alives are generally controlled at the server level and not controllable in .htaccess. You'll need to reach out to your hosting provider."

This guy says it may be related to SSL

http://www.webpagetest.org/forums/showthread.php?tid=12104&highlight=Keep+Alive

and this guy fixed it by editing his SSL v host file.

https://www.webpagetest.org/forums/showthread.php?tid=317

More articles on this:

http://bibwild.wordpress.com/2012/05/03/check-your-apache-httpds-make-sure-theyre-keepalive-on/

http://www.nysavann.com/testing/pha...ttps-performance-with-without-keep-alive.html

http://blogs.msdn.com/b/ieinternals...onfiguration-set-to-slow.aspx?Redirected=true
 
Last edited:

DRE

Well-known member
#10
Okay so WebPageTest.org has been giving me a False Positive because GTMetrix says Keep Alive is on.

Guess I'll just move on to the next step, fixing First Byte Time.