open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.12k stars 590 forks source link

Memory leak + cannot receive any message #3204

Closed BbayuGt closed 5 months ago

BbayuGt commented 5 months ago

Are you using the latest version of the library?

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Personal account (normal)

Mode

EASY API/CLI

Current Behavior

No message is being received, also its using abnormally high cpu and ram usage

image

Expected Behavior

It normally using 500-700mb of ram, especially when it first boots up.

Steps To Reproduce

Just start openwa normally

create() code OR full CLI command + CONFIG

services:

  wa:
    image: openwa/wa-automate
    ports:
      - "8888:8888"
    environment:
      - PORT=8888
      - WA_SOCKET=true
      - WA_KEY=X
      - WA_LICENSE-KEY=X
      - WA_CUSTOM_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
      - WA_BLOCK_ASSETS=true
    deploy:
      resources:
        limits:
          cpus: '3.0'
          memory: 4G

DEBUG INFO

{
  "WA_VERSION": "2.3000.1013215824",
  "WA_AUTOMATE_VERSION": "4.71.10",
  "BROWSER_VERSION": "HeadlessChrome/124.0.6367.60",
  "START_TS": 1714648159386,
  "RAM_INFO": "Total: 6.21 GB | Free: 5.51 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": true
}

Environment

- OS: Linux 5.15
- Node: 21.7.3
- npm: 10.5.2

Screenshots/Logs

No response

Anything else?

No response

BbayuGt commented 5 months ago

Update: the memleaks seems to be gone, it uses ~400mb of ram now, but still no message received

TVARecordings commented 5 months ago

Happening here too. Just no response to onMessage() or onAnyMessage(). Client.onGroupApprovalRequest() is down too.

BbayuGt commented 5 months ago

This has been fixed, thanks