Luamix
Luamix
DIAdiscord.js - Imagine an app
Created by Luamix on 8/4/2024 in #djs-questions
[ERR_IPC_CHANNEL_CLOSED]
Since a few days this error randomly occurs and the shard then goes offline. The error:
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at new NodeError (node:internal/errors:405:5)
at target.send (node:internal/child_process:747:16)
at module.exports.<anonymous> (/home/container/node_modules/discord.js/src/sharding/ShardClientUtil.js:43:19)
at module.exports.emit (node:events:517:28)
at WebSocketManager.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:271:19)
at WebSocketManager.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/home/container/node_modules/@discordjs/ws/dist/index.js:1173:51)
at WebSocketShard.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:290:37)
at WebSocketShard.destroy (/home/container/node_modules/@discordjs/ws/dist/index.js:739:14)
at async WebSocketShard.onMessage (/home/container/node_modules/@discordjs/ws/dist/index.js:996:9) {
code: 'ERR_IPC_CHANNEL_CLOSED'
} uncaughtException
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at new NodeError (node:internal/errors:405:5)
at target.send (node:internal/child_process:747:16)
at module.exports.<anonymous> (/home/container/node_modules/discord.js/src/sharding/ShardClientUtil.js:43:19)
at module.exports.emit (node:events:517:28)
at WebSocketManager.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:271:19)
at WebSocketManager.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/home/container/node_modules/@discordjs/ws/dist/index.js:1173:51)
at WebSocketShard.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:290:37)
at WebSocketShard.destroy (/home/container/node_modules/@discordjs/ws/dist/index.js:739:14)
at async WebSocketShard.onMessage (/home/container/node_modules/@discordjs/ws/dist/index.js:996:9) {
code: 'ERR_IPC_CHANNEL_CLOSED'
} uncaughtException
` It's doesn't occur when the bot is starting. I have a "live leaderboard" which is sent every hour (with node-cron). In that file I use the broadcastEval function. I think the error sometimes occurs when the broadcastEval function is called. But not always and only on some shards. Maybe a little more info about the bot. It is on round about 8500 guilds and has 9 shards. I use node version 18.20.3. With my test bot is doesn't happen. I tried this fix but it didn't work for me. (When I changed sharding mode to "worker" some things didn't work) Do you have any idea how to solve that issue? Thanks in advance :D
11 replies