Open mikelx99 opened 2 months ago
0|app | rss: 387 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 35 MB 0|app | external: 203 MB 0|app | arrayBuffers: 199 MB 0|app | . 0|app | . 0|app | rss: 396 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 35 MB 0|app | external: 212 MB 0|app | arrayBuffers: 209 MB 0|app | . 0|app | . 0|app | rss: 403 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 35 MB 0|app | external: 218 MB 0|app | arrayBuffers: 215 MB 0|app | . 0|app | . 0|app | rss: 412 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 35 MB 0|app | external: 229 MB 0|app | arrayBuffers: 225 MB 0|app | . 0|app | . 0|app | rss: 420 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 35 MB 0|app | external: 234 MB 0|app | arrayBuffers: 231 MB 0|app | . 0|app | . 0|app | rss: 428 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 36 MB 0|app | external: 245 MB 0|app | arrayBuffers: 242 MB 0|app | . 0|app | . 0|app | rss: 436 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 36 MB 0|app | external: 252 MB 0|app | arrayBuffers: 248 MB 0|app | . 0|app | . 0|app | rss: 442 MB 0|app | heapTotal: 38 MB 0|app | heapUsed: 35 MB 0|app | external: 257 MB 0|app | arrayBuffers: 253 MB
Did you manage to find a solution to this problem?
const messageHandler = async function (sock) { sock.ev.on("messages.upsert", async (m) => {
const msg = m.messages[0];
const msgText = getText(msg);
const imageUrl = getImgUrl(msgText);
return await sock.sendMessage(
msg.key.remoteJid,
{
image: {
url: imageUrl,
},
caption: msgText,
},
{ quoted: msg }
);
}) }
try return
Hello, my Baileys bot has a high memory usage problem. When the bot sends an image, the RAM usage increases. If the bot sends a lot of images, the memory usage keeps increasing and it does not release that memory. This continues until the system memory limit is reached and the system kills my bot.
Even after the bot reaches 800MB memory usage, leaving it idle for 1 days does not release that memory.
However, when I send a document message (500MB document), the memory is released after the message sent successfully. Currently, this issue occurs when sending images. Please help me fix this issue. Thank you
Connection Code
Handle Image Code