AlexJ Posted June 16, 2020 Posted June 16, 2020 1 minute ago, Thomas P said: The Redis cache itself? Use redis-cli e.g.: New machine doesn't have any cache and i think IPS is looking for cache? how do I tell IPS not to use cache? I am using same password and such on new machine and somehow IPS throws the error for redis cache.
Thomas P Posted June 16, 2020 Posted June 16, 2020 Check settings in ACP and constants.php file, there is the caching method and connection if configured. sobrenome 1
sadams101 Posted June 16, 2020 Posted June 16, 2020 To flush the Redis cache the command line Apache server command is: redis-cli FLUSHALL I have command line access to my server, I'm not sure if you do. To restart on command line use one of these two: systemctl restart redis service redis restart This was also very helpful: https://redis.io/topics/admin sobrenome 1
Chris027 Posted September 15, 2020 Posted September 15, 2020 (edited) On 4/28/2020 at 11:43 AM, sadams101 said: I am still running redis, but have turned off the "Cache page output for guests" feature (mine was set to 15 minutes) due to a bug with it that still exists. My site speed consultant @Adlago has also experienced the bug, and warned me not to use this feature. What happens is that the cache gets corrupted, for example it will cache a desktop version of the site with zero CSS, so the user experience is horrible, at least for that 15 minutes. I was hoping the bug was fixed, but while I was running some speed tests I found proof that it still exists. In screen 1 is a normal speed test, and if you look at the test there is a screen shot of the page as it should look, and in screen 2 if you look at the screen shot it took of my site you will see a view of it without any CSS. Clearing my cache in the ACP: Support > Something isn't working right, made this go back to normal, and verify that it is indeed an issue. Although it did speed my site up by ~10%, it is not worth the trade off. It's sad that a bug like this, one that I reported to IPB years ago, still makes this feature unusable. Screen 1 speed test with normal screen shot view: Screen 2 of a test on the exact same page, but in this one there is no CSS that got cached, and the screenshot reflects this: PS - If google's spider is indexing a site without CSS, those pages are excluded from search results. Lot's of pages on your site could get indexed while this issue is occurring. I have this same issue with redis and css. I had to disable redis for my site to load properly. Otherwise, every few clicks the css wouldn't load. Did you resolve this issue? Edited September 15, 2020 by Chris027 sobrenome 1
bfarber Posted September 15, 2020 Posted September 15, 2020 It sounds like what is happening is... Guest visits the page. It is rendered, and a cached copy (pointing to specific CSS URLs) is stored. ...At some point in between the last and next step, the CSS files are deleted and rebuilt. Guest visits the page. The cached copy is delivered, however it is pointing to the old CSS URLs and not the new ones. If that theory is correct, I don't believe the issue would persist in v4.5 because CSS filenames are now static and rely solely on the 'v' query string parameter for cache busting. sobrenome 1
CoffeeCake Posted September 15, 2020 Posted September 15, 2020 We found that performance is much improved with Guest caching turned off and with sessions & threadviews sent to MySQL. Using Redis 5, php 7.3
Chris027 Posted September 15, 2020 Posted September 15, 2020 (edited) 15 minutes ago, bfarber said: It sounds like what is happening is... Guest visits the page. It is rendered, and a cached copy (pointing to specific CSS URLs) is stored. ...At some point in between the last and next step, the CSS files are deleted and rebuilt. Guest visits the page. The cached copy is delivered, however it is pointing to the old CSS URLs and not the new ones. If that theory is correct, I don't believe the issue would persist in v4.5 because CSS filenames are now static and rely solely on the 'v' query string parameter for cache busting. I have the issue when I'm logged in as admin. I didn't test for guest. I just upgraded to nginx 1.19.2 and will try it again. edit. I'm on 4.5.2 Just tested it and have same css issue with php7.4, redis 6, nginx 1.19.2 Edited September 15, 2020 by Chris027 sobrenome 1
bfarber Posted September 15, 2020 Posted September 15, 2020 I would recommend submitting a ticket in that case so we can take a look. Chris027 and sobrenome 1 1
rfcontreras Posted September 17, 2020 Posted September 17, 2020 I'm using 4.5 with Redis 5.x and it seems that it's not caching anything. Is this cache supposed to be used only for guest visitors or also registered visitors? My Cache on Support-> Redis are very low. Thanks in advance
bfarber Posted September 18, 2020 Posted September 18, 2020 We cache various common data (such as the group permissions, license data, custom profile field configurations, etc.), as well as full HTML pages for guests. There are configuration options that can alter what is cached to an extent. sobrenome 1
CoffeeCake Posted September 18, 2020 Posted September 18, 2020 2 hours ago, rfcontreras said: In the admincp or in redis ? Thanks In ACP > Settings > Advanced Configuration > File Storage. You can change settings that will result in a new constants.php sobrenome 1
rfcontreras Posted September 19, 2020 Posted September 19, 2020 On 9/18/2020 at 3:50 PM, Paul E. said: In ACP > Settings > Advanced Configuration > File Storage. You can change settings that will result in a new constants.php Yes, this is for Redis activation, I mean MORE settings ir order to select what to cache. sobrenome 1
CoffeeCake Posted September 20, 2020 Posted September 20, 2020 5 hours ago, rfcontreras said: Yes, this is for Redis activation, I mean MORE settings ir order to select what to cache. There's a toggle switch that causes sessions and thread views to be stored in Redis instead of MySQL on that page. That's the only option. For us, turning on that option significantly slowed down the site. sobrenome 1
ahc Posted September 20, 2020 Posted September 20, 2020 Just now, Paul E. 5 hours ago, rfcontreras said: Yes, this is for Redis activation, I mean MORE settings ir order to select what to cache. There's a toggle switch that causes sessions and thread views to be stored in Redis instead of MySQL on that page. That's the only option. For us, turning on that option significantly slowed down the site. Same issue except our site just wasn’t usable. No matter where you went you got stuck in an infinite loading screen until it timed out. Redis memory was maxed out and couldn’t figure out why until we saw that enabled. Disabled it and waited for cache to flush itself out and fixed the issue.
CoffeeCake Posted September 20, 2020 Posted September 20, 2020 We saw very high I/O and that's with SSD drives. sobrenome 1
bfarber Posted September 21, 2020 Posted September 21, 2020 define( 'OUTPUT_CACHE_METHOD', 'Redis' ); // Store guest pages in Redis define( 'STORE_METHOD', 'Redis' ); // Use Redis for datastore define( 'CACHE_METHOD', 'Redis' ); // Use Redis for caching define( 'REDIS_ENABLED', true ); // Use Redis for sessions sobrenome 1
sadams101 Posted September 23, 2020 Posted September 23, 2020 What setting triggers this line? It isn't in my constants.php file, and I do have the option on for "Use Redis to reduce MySQL overhead" define( 'OUTPUT_CACHE_METHOD', 'Redis' ); // Store guest pages in Redis sobrenome 1
sadams101 Posted September 23, 2020 Posted September 23, 2020 Mine runs faster without that line...but the real question is why the line isn't being inserted when I check the box to "Use Redis to reduce MySQL overhead"? sobrenome 1
bfarber Posted September 24, 2020 Posted September 24, 2020 Because it's not an option from the AdminCP, but is an option at the software level. You can review init.php and see all the available constants there with comments explaining what they do. sobrenome 1
Makoto Posted September 24, 2020 Posted September 24, 2020 (edited) On 9/15/2020 at 12:17 PM, Paul E. said: We found that performance is much improved with Guest caching turned off and with sessions & threadviews sent to MySQL. Using Redis 5, php 7.3 FWIW it's the same for us, on a site getting millions of pageviews a month. YMMV on if it actually improves performance or not. MySQL overhead is very low for us because our database server is well optimized and runs on a powerful server. If MySQL overhead is high on your server, Redis will likely help. If not, it may do nothing or can actually make performance worse in some cases, as hard as it is to believe. This isn't placebo either. I've benchmarked and monitored the performance impact over time using NewRelic and confirmed this for our specific server environment. On the other hand, I've had a client where it made portions of his site that were inaccessible (e.g. the online users list from session handling) functional again once Redis was set up and configured. So it all depends. Edited September 24, 2020 by Makoto CoffeeCake and sobrenome 2
sadams101 Posted October 4, 2020 Posted October 4, 2020 On 9/24/2020 at 7:33 AM, bfarber said: Because it's not an option from the AdminCP, but is an option at the software level. You can review init.php and see all the available constants there with comments explaining what they do. It's always fun to read through 1,400 lines of code to find hidden settings. Ever thought of making simple check boxes for these options, with the explanations, in the Admin CP? I guess I'm just old fashioned... optrexnz, sobrenome and Chris027 3
CoffeeCake Posted October 5, 2020 Posted October 5, 2020 6 hours ago, sadams101 said: It's always fun to read through 1,400 lines of code to find hidden settings. Ever thought of making simple check boxes for these options, with the explanations, in the Admin CP? I guess I'm just old fashioned... Most (if not all) of the constants that can be set can be found in init.php. sobrenome 1
sadams101 Posted October 5, 2020 Posted October 5, 2020 (edited) I understand this, but the question was why not simply make these settings available in the Admin CP? Why do I need to learn about some of these hidden (to 99% of users) settings well over 10 years after running this software? Also, even when looking at init.php there is no clear explanation for how to implement them. For example I see no directions that tell me that I need to add this line to my constants.php to turn this feature on--I found out how to do this here. It seems like a basic setting that ought to have a check box on the same page as the other Redis settings. Does anyone disagree? \ define( 'OUTPUT_CACHE_METHOD', 'Redis' ); Edited October 5, 2020 by sadams101 leonovich_J and sobrenome 2
bfarber Posted October 6, 2020 Posted October 6, 2020 If an option is a constant in init.php we likely don't intend to expose it to all users en-masse. Some things are a bit more technical, experimental, or work at a much lower level in the software and thus we don't necessarily want users playing with those options "willy nilly" or without understanding the ramifications. I'm not commenting on this specific setting, but just speaking in general. Sometimes we need to make an option for something but don't necessarily want all users trying to toggle it on and off. sobrenome 1
Recommended Posts