Okay, I have finally isolated my problem which I've opened multiple questions about.
The problem is that
await client.stores.get('commands').loadAll();
(my old bad way of getting all the pieces and reloading them in a loop does the same)
Requirements for reproduction:
- 20+ shards with ~15k guilds (not entirely sure that it's required actually)
- active users using commands
- run the code on all of them
What happens:
- About half of the shards complete the process within seconds.
- All clients "freeze" for 10-20 seconds, the shards do not respond to any discord message or interaction. however the event loop does not seem to be blocked because independent functions still run.
- All shards resume normal operation and the rest of the loadAlls finish.
djs: 14.11.0
node: 16.13.1
sapphire/framework: 4.4.3