Giter Site home page Giter Site logo

Comments (5)

FZambia avatar FZambia commented on May 28, 2024 1

As discussed in Centrifugo Telegram group: the root cause here was that history_ttl is 2160h (90 days). It's greater than default history_meta_ttl value used by Centrifugo (which is 720h i.e. 30 days). History Meta TTL must be greater than history TTL to avoid errors like this.

The documentation contained old description of defaults used in Centrifugo v4 (previously history meta ttl was 90 days by default). Fixed this and added more clarifications on a proper configuration in centrifugal/centrifugal.dev@51fb304

Need to think more whether it's possible to avoid such situations - we can at least validate ttl values on start.

from centrifugo.

VanderY avatar VanderY commented on May 28, 2024

Hello, @FZambia!

I was getting same error.
Did what you suggested - increased history_meta_ttl to be greater than history_ttl but still getting this error.

Maybe you can give me some advice on what to do with this?

from centrifugo.

FZambia avatar FZambia commented on May 28, 2024

@VanderY hello, I think you are getting errors for already existing streams. Fixing configuration won't help with them automatically, only help with newly created streams. You are using Redis engine right? If yes - then theoretically flushing state in Redis may help to get rid of such errors. If you are using auto recovery and using Centrifugo right on client side – then flushing Redis state should not cause a serious issue for clients as the state must be loaded from your main database since clients will receive insufficient state advices. But I suggest testing this scenario and decide whether it's acceptable. Also, make sure Redis is only used for Centrifugo, otherwise you may need to clean up only Centrifugo keys.

If you need to keep information in Redis then the only way here is manual migration of keys. But using Centrifugo as persistent storage is not a recommended pattern - so I believe it's not your use case.

from centrifugo.

FZambia avatar FZambia commented on May 28, 2024

Found one more related bug which could result into similar issues with Memory Engine – fixed in centrifugal/centrifuge#366

from centrifugo.

FZambia avatar FZambia commented on May 28, 2024

Config validation and fix above are now part of v5.3.0. I also created an issue in the underlying Centrifuge library to return an error during publish, this is not very relevant to Centrifugo though.

from centrifugo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.