Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
February 11, 201114 yr On 2/10/2011 at 10:45 PM, .Nuno. said: Add the value of the command ulimit -n or less. unfortunately still the same error (but with different values) depending on which way round they are set : invalid number HTTP accelerator: /etc/init.d/varnish: line 54: ulimit: 30000 : invalid numberish: line 57: ulimit: 32000 : invalid number HTTP accelerator: /etc/init.d/varnish: line 54: ulimit: 30000 : invalid numberish: line 57: ulimit: 30000 : invalid number HTTP accelerator: /etc/init.d/varnish: line 54: ulimit: 32000 : invalid numberish: line 57: ulimit: 30000
February 11, 201114 yr Read this article to understand how you can raise ulimit value: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
February 11, 201114 yr Varnish is brilliant at what it does. Thought i would share this with you, great for people who use cPanel http://www.unixy.net/varnish/ Not tried it myself yet but i'm thinking about having a play with the 14 day trial next week.
February 12, 201114 yr On 1/30/2011 at 10:35 AM, Gary. said: Your WHM panel based, So why do you not use the WHM plugin which is Globally rather than per account ? Only makes sense. :whistle: http://community.invisionpower.com/topic/328398-unbelievable-results-with-varnish/page__view__findpost__p__2074456 Ant :P I have tested and does seem fine, Nice layout for a plugin also but I have not put it under real preasure yet, I will do via localhost probably in a few days time.
February 15, 201114 yr On 2/11/2011 at 10:10 PM, AnthonyKinson said: Varnish is brilliant at what it does. Thought i would share this with you, great for people who use cPanel http://www.unixy.net/varnish/ Not tried it myself yet but i'm thinking about having a play with the 14 day trial next week. I have it installed on my server since yesterday. As I was installing it I had a second terminal running top. Load was running between 2 and 3 before the install, it rarely reaches 1 now. I have noticed a few anomalies regarding persistent login on my admin account. Initially I was logged out on my first visit after the install. Switching skins sometimes causes unintentional logout. During an ongoing session on the forum these issues do not crop up. The installation was smooth as silk and it creates an uninstall button in WHM. I think it is likely I'll be licensing this Varnish plugin.
February 15, 201114 yr On 2/15/2011 at 3:41 PM, Steves Web Hosting said: I have it installed on my server since yesterday. As I was installing it I had a second terminal running top. Load was running between 2 and 3 before the install, it rarely reaches 1 now. I have noticed a few anomalies regarding persistent login on my admin account. Initially I was logged out on my first visit after the install. Switching skins sometimes causes unintentional logout. During an ongoing session on the forum these issues do not crop up. The installation was smooth as silk and it creates an uninstall button in WHM. I think it is likely I'll be licensing this Varnish plugin. Hello, If your talking about the forum in your signature, varnish is not caching anything. You must setup a configuration that suites you setup. Varnish default behavior is not cache content with cookies and IPB use them. You can see my setup here and start with that.
February 15, 201114 yr On 2/11/2011 at 9:23 AM, .Nuno. said: Read this article to understand how you can raise ulimit value: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ I've increased my ulimits now but I still get the same error when I run service varnish start if I run this command varnishd -f /etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080 it works, logging entries in varnishlog whats the difference between this command and the service varnish start?
February 15, 201114 yr Hi, You can lower the NFILES variable to match your system settings. here is another tutorial for Centos: http://plone.lucidso...n-a-centos-5-vm Don't forget to change apache and varnish ports ... varnish should listen in port 80 and apache in another port
April 19, 201113 yr On 2/13/2011 at 4:09 AM, Shamil said: I've personally had better results using LiteSpeed and it's internal caching. You ought to write a tutorial. Might bring some decent traffic to your site. I'm going to give varnish and litespeed a go tomorrow, but litespeed cache info for ipb is hard to come by.
April 19, 201113 yr On 4/19/2011 at 6:22 AM, blair said: You ought to write a tutorial. Might bring some decent traffic to your site. I'm going to give varnish and litespeed a go tomorrow, but litespeed cache info for ipb is hard to come by. I sure will do, I've actually written tutorials on my company's intranet, so staff are able to do this on clients' servers.
May 2, 201113 yr My host switched from litespeed to Varnish lately to improve server performance. The performance increase was noticeable but it did cause issues with my forum. The main issue being that with Varnish active for my domain I am unable to stay logged in. With Varnish de-active for my domain I am able to stay logged in. I was not aware of this thread until it was pointed out in the long support ticket I had with IPS over the weekend.
May 2, 201113 yr On 5/2/2011 at 3:36 PM, .Nuno. said: I use varnish without issues. My page load time (Webmaster tools) decreased 35% Lucky you not to have the log in issues. I will admit it is faster though.
May 2, 201113 yr Amy if your host implemented Varnish, it was probably the Unixy plugin. Which works quite differently than the Varnish VCL discussed here. Following is from a vB test, but the results should be much the same: Quote Unixy.net took a different approach to Varnish caching as WHM/Cpanel users are predominantly web hosts with many shared or VPS hosting accounts, so per site/application configuration of VCL rules and logic would be a daunting and time consuming task. So Unixy.net opted to change Varnish’s default VCL rules from don’t cache files with cookies, to hash and cache files with cookies – essentially turning Varnish into a per user/visitor cache. This dramatically reduces the maximum potential cache hits ratio and adds a bit more resource usage but is countered by the default Unixy.net’s VCL rule set only setting a TTL of 20 seconds for Varnish cache, so a user whether logged in member or guest with cookies would only see a cached file for their session for 20 seconds... Quote The end result was much snappier loading pages on my vBulletin and wordpress sites – I have 2 vB forums and 2 wordpress based sites which are live and active. But cache hit rate for per user caching config is much lower than what I tested with on virtualized server running Varnish in it’s native default VCL state. The ratio of Cache hit rate to requests served was between 0.10 to 0.25 average with peak of around 0.28 to 0.30 cache hit rate which means 70-80+ % of requests still hit the Apache backend server. Maybe the 20 second TTL cache is responsible for the log in issues?
May 2, 201113 yr Ya they use Unixy plugin and I mentioned that in the ticket with IPS. My host is working with Unixy plugin right now to fix the issue.
May 2, 201113 yr On 5/2/2011 at 3:55 PM, Amy T said: Lucky you not to have the log in issues. I will admit it is faster though. If you note, I don't cache "index.php", only topics/, forum/, gallery/ and blogs/. If you do this you wont get login/logout problems I use nginx -> varnish -> apache2+mod_php. nginx is serving static content and gzip varnish+apache content and last ... I use esi to count topics/images views.backend default { .host = "127.0.0.1"; .port = "8080"; } sub vcl_recv { ## == Normalise Accept-Encoding == if (req.http.Accept-Encoding) { if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg){:content:}quot;) { # No point in compressing these remove req.http.Accept-Encoding; } elsif (req.http.Accept-Encoding ~ "gzip") { set req.http.Accept-Encoding = "gzip"; } elsif (req.http.Accept-Encoding ~ "deflate") { set req.http.Accept-Encoding = "deflate"; } else { # unkown algorithm remove req.http.Accept-Encoding; } } ## == Mobile == if (req.http.User-Agent ~ "(iPad|iPhone|iPod|Android|SymbianOS|^BlackBerry|^SonyEricsson|^Nokia|^SAMSUNG|^LG)") { return(pass); } if (!((req.http.Cookie ~ "member_id=" && req.http.Cookie !~ "member_id=(0|-1)") || req.http.Cookie ~ "(guestSkinChoice|language)")) { if (req.url ~ "^/(public|forum|topic|gallery|blogs|members|user|calendar)/") { unset req.http.cookie; set req.grace = 15s; } if (req.url == "/" || req.url == "/index.php") { unset req.http.cookie; set req.grace = 15s; } } } sub vcl_fetch { if (!((req.http.Cookie ~ "member_id=" && req.http.Cookie !~ "member_id=(0|-1)") || req.http.Cookie ~ "(guestSkinChoice|language)")) { ## == INDEX == if (req.url == "/" || req.url == "/index.php") { unset beresp.http.set-cookie; set beresp.ttl = 300s; set beresp.grace = 30s; } ## == ESI == if (req.url ~ "^/(gallery/image|topic)/") { esi; unset beresp.http.set-cookie; set beresp.ttl = 300s; set beresp.grace = 30s; ## Others } elseif (req.url ~ "^/(public|forum|gallery|blogs|members|user|calendar)/") { unset beresp.http.set-cookie; set beresp.ttl = 600s; set beresp.grace = 30s; } } } sub vcl_deliver { remove resp.http.X-Varnish; remove resp.http.Via; remove resp.http.Age; remove resp.http.X-Powered-By; if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; set resp.http.X-Cache-Hits = obj.hits; } else { set resp.http.X-Cache = "MISS"; } }
May 2, 201113 yr Well my host does not want to edit the Varnish files just in case it causes issues for other customers. But they had Unixy look into it and he thinks he found a work around.
May 5, 201113 yr WOW I just installed the Unixy mod on my dedicated box and page loads (even IPB pages) are near instant now. I'll for sure be licensing this.
May 5, 201113 yr On 5/5/2011 at 4:13 PM, .Peter said: WOW I just installed the Unixy mod on my dedicated box and page loads (even IPB pages) are near instant now. I'll for sure be licensing this. are you having issues with staying logged in on your IPB install. Reason I ask is when my host changed to Varnish it caused log in issues for IPB. If you do not have that issue could you post your Varnish config so I can let my host know.
May 5, 201113 yr On 5/5/2011 at 4:51 PM, Amy T said: are you having issues with staying logged in on your IPB install. Reason I ask is when my host changed to Varnish it caused log in issues for IPB. If you do not have that issue could you post your Varnish config so I can let my host know. I'm just running the standard configuration that the unixy installed.
May 5, 201113 yr As far as I know that is what my host is running too. They actually did not want to modify it just to get my ipb issues fixed.
May 6, 201113 yr Author On 5/5/2011 at 7:08 PM, Amy T said: As far as I know that is what my host is running too. They actually did not want to modify it just to get my ipb issues fixed. You may have to play with your redirect settings if they won't change it - I noticed that varnish by default caches redirects, and if they didn't change that you might get problems with redirects. Other than that, Varnish shouldn't interfere too much with IPB.
May 6, 201113 yr Cookies are what I have had issues with. Not even seen any redirect issues unless going to the ip.content or gallery is a redirect. The cookie issue is being logged out, constantly. Been told it is do to Varnish caching cookies.
May 6, 201113 yr I got my issue fixed. I had to turned off Path and Prefix for the cookie settings and the issue went way. The issue comes back if you set a prefix. So now I am able to run Varnish with no issues.
Archived
This topic is now archived and is closed to further replies.