Skip to content

[JDA Gateway-Worker 1] WARN WebSocketClient - Missed 2 heartbeats! Trying to reconnect... #1735

Discussion options

You must be logged in to vote

This means your listener methods take too long to finish. Therefore other events will be delayed and this warning comes up. This can have two reasons:

  1. You use blocking operations such as complete() or submit().get() which will block the current code until the action was done and therefor can take very long.
  2. You have expensive operations such as image manipulation or API calls which can take (very) long.

If it's the first case you should use queue() with the success consumer instead, where the consumer will be asynchronously executed when the action (such as sending messages, retrieving users, etc.) was done. Read more in the wiki about it.

If it's the second case, you should process suc…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Yellowstrawberrys
Comment options

@DManstrator
Comment options

@Yellowstrawberrys
Comment options

Answer selected by Yellowstrawberrys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1734 on July 19, 2021 07:05.