Jump to content

Recommended Posts

Posted
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. 

  • 2 months later...
Posted (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:

image.thumb.png.1f7ee5fda2636bdd42bf46e56bce6045.png

 

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:

image.thumb.png.1a659def1260f46e315c61cd97c3b106.png

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 by Chris027
Posted

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.

Posted (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 by Chris027
Posted

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

Posted

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.

Posted
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.

Posted
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.

Posted
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.

Posted
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

 

Posted (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 by Makoto
  • 2 weeks later...
Posted
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...

Posted
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.

Posted (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 by sadams101
Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...