Closed freyacodes closed 1 week ago
Given that the toString()
method of the scheduler indicates that it was terminated, what could make the elastic scheduler terminate early in the life of the DefaultShardManager
? The GET/gateway/bot
mention implies that the termination happened before line 573 in DefaultShardManager.java:573
(JDAImpl buildInstance(shardId)
). There is another call to this route, but that is done with a disposable single threaded scheduler.
Unfortunately the full logs are lost to time, and I would like to avoid deploying a build that I know to be broken.
Is this issue happening consistently for you?
It was consistently happening upon restarting the JVM after it first occurred. However, I deployed today without the problem occurring, meaning that the issue simply went away without explanation.
You are free to close this issue if you wish. No one else seems to have experienced this issue.
I don't consider the issue fixed, so I'll keep it open hoping to get more information to track down the underlying problem.
I found a way to reproduce. It seems deceptively simple:
DefaultShardManager
with default threading (as shown above).DefaultShardManager#restart(shardId)
And ker-bloom. Every shard stops being able to process RestAction
s. The expected behavior is to make the shard reconnect.
When a single shard is restarted, it shuts down its executors. This is quite destructive given that executors are shared between JDAImpl
s when sharding.
Here is one terminated executor being referenced from 4 shards:
Found the problem, looks like the threading config incorrectly applied the automatic shutdown flag. I'll publish a hotfix release later today.
Hopefully this is fixed in 5.0.1.
General Troubleshooting
Version of JDA
5.0.0-beta.24
Expected Behaviour
I expected
SequentialRestRateLimiter
to process requests.Instead, it seems that any
RestActions
that are queued produce this exception. In production, we use Docker containers that contain a JVM using JDA. We have successfully released beta 24 on FredBoat, however we are encountering this exception on just one of our smaller servers/bots using the same container.Code Example for Reproduction Steps
Code for JDABuilder or DefaultShardManagerBuilder used
Exception or Error