GithubHelp home page GithubHelp logo

Vanishing stream sessions about blocktogether HOT 2 CLOSED

jsha avatar jsha commented on May 26, 2024
Vanishing stream sessions

from blocktogether.

Comments (2)

jsha avatar jsha commented on May 26, 2024

Plan of attack here: Twitter streams emit an empty message "{}" every ~5 seconds while they are active. We ignore these keepalive messages currently, but as a debugging measure we should keep an in-memory last-updated timestamp for each stream, either stored as an extra field on the req stored in activeStreams, or in its own map. Timestamp gets updated with all messages even if they are ignored. In the periodic logger for how many active streams, map over the keys of activeStreams and log the user and age for any streams whose last-updated timestamp is >60 seconds.

from blocktogether.

jsha avatar jsha commented on May 26, 2024

Wound up punting on this and just adding a setTimeout on the stream, so if it doesn't get anything for 70 seconds, it aborts, which triggers a restart.

from blocktogether.

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.