GithubHelp home page GithubHelp logo

close event about slack-bot-api HOT 6 CLOSED

mishk0 avatar mishk0 commented on August 10, 2024
close event

from slack-bot-api.

Comments (6)

Starfox64 avatar Starfox64 commented on August 10, 2024

You could call the login() method, it should restart an RTM session.

from slack-bot-api.

mitselek avatar mitselek commented on August 10, 2024

It usually closes the connection immediately after login. Might there be some limit on number of simultaneous sockets per one user? I do have around 20 bot instances deployed using same credentials.

from slack-bot-api.

Starfox64 avatar Starfox64 commented on August 10, 2024

If you suspect that sockets are being closed because of how many instances are running, I would suggest to listen for error events on the socket and look if your sockets are being rate limited. According to the API documentation continuing to send request after being rate limited will get your application disconnected.

from slack-bot-api.

mitselek avatar mitselek commented on August 10, 2024

They get disconnected even when not rate limited. They really don't talk much - 2-3 messages per hour per instance so total messages are around 40 messages/hour.
From pool of 20 machines about 15 are connected and 5 get disconnected. Machines go down for night and in the morning when they boot up, the situation is similar. Just disconnected machines might not be the same ones.

from slack-bot-api.

mishk0 avatar mishk0 commented on August 10, 2024

Your question is how to reconnect or why connection sometimes closes immediately?

For reconnection you can simply invoke login method.
Is second problem connected with this issue #20?

from slack-bot-api.

mitselek avatar mitselek commented on August 10, 2024

My question as of today is, if anyone knows why sockets get closed, if there are more than 17 instances of same bot user. I think this should be asked from slack team instead :)
Otherwise login method works as expected and thank You both for this.

from slack-bot-api.

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.