Closed D-erhan closed 2 weeks ago
if you run 4 sessions in a row, the previous failed ones are restarted and go back to failed
and spamming with this
[10:25:23.522] WARN (SessionManagerPlus/49): session:default9 - Error while getting engine info {"reqId":1036581,"session":"default9"}
error: {}
[10:25:23.522] WARN (SessionManagerPlus/49): session:default56 - Error while getting engine info {"reqId":1036581,"session":"default56"}
error: {}
[10:25:23.522] WARN (SessionManagerPlus/49): session:default57 - Error while getting engine info {"reqId":1036581,"session":"default57"}
error: {}
[10:25:23.522] WARN (SessionManagerPlus/49): session:default58 - Error while getting engine info {"reqId":1036581,"session":"default58"}
error: {}
[10:34:56.615] INFO (WhatsappSession/49): session:default61 - Job cancelled {"reqId":1036654,"session":"default61","sessionRunTimestamp":1725273200923,"job":"start-engine","class":"SingleDelayedJobRunner"}
[10:34:56.616] INFO (SessionManagerPlus/49): Session has been stopped. {"reqId":1036678}
[10:34:56.622] ERROR (WhatsappSession/49): session:default61 - Protocol error (Runtime.callFunctionOn): Target closed. {"reqId":1036654,"session":"default61","sessionRunTimestamp":1725273200923}
err: {
"type": "ProtocolError",
"message": "Protocol error (Runtime.callFunctionOn): Target closed.",
"stack":
ProtocolError: Protocol error (Runtime.callFunctionOn): Target closed.
at /app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:329:24
at new Promise (<anonymous>)
at CDPSessionImpl.send (/app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:325:16)
at ExecutionContext._ExecutionContext_evaluate (/app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:211:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async JSHandle.evaluateHandle (/app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js:97:16)
at async WaitTask.rerun (/app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:114:28)
"name": "ProtocolError",
"originalMessage": ""
}
[10:34:56.786] INFO (49): request errored {"reqId":1036677,"req":{"id":1036677,"method":"GET","url":"/api/screenshot?session=default61","query":{"session":"default61"},"params":{"0":"api/screenshot"}},"res":{"statusCode":500},"responseTime":3415}
err: {
"type": "ProtocolError",
"message": "Protocol error (Page.captureScreenshot): Target closed.",
"stack":
ProtocolError: Protocol error (Page.captureScreenshot): Target closed.
at /app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:329:24
at new Promise (<anonymous>)
at CDPSessionImpl.send (/app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:325:16)
at CDPPage._CDPPage_screenshotTask (/app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.js:2591:77)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
"name": "ProtocolError",
"originalMessage": ""
}
62-session WEBJS I start one session and 2-3 others are disconnected
I see, try scaling it to different workers, like for 50 for each container https://waha.devlike.pro/blog/waha-scaling-how-to-handle-500-sessions/
Never tested it with 50+ sessions with WEBJS in a single container, to be honest... Chromium+puppeter instances are pretty hard thing to deal with in large scale
And