websocket icon indicating copy to clipboard operation
websocket copied to clipboard

Memory overflow; using ReadMessage() method

Open slclub opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

  1. Description

I am very sure the memeory overflow was came from the method of ReadMessage(). It is like buffer was not released.

Package version is v1.5.0.

  1. Phenomenon

1000 connections will add 5 -10 MB of memory. 2000 connections will add 10-25 MB of memory. 5000 connections will add 50+ MB of memory.

When the method of ReadMessage is blocked, the memory become normal.

  1. Project Address
  • Server: https://github.com/slclub/easy/tree/master/examples/simple
  • Client: https://github.com/slclub/easy/tree/master/examples/simple_client

Expected Behavior

No response

Steps To Reproduce

No response

Anything else?

No response

slclub avatar Dec 14 '23 09:12 slclub

@slclub You linked to two projects. Which one has the "memory overflow"? What specifically do you mean by "memory overflow"? Does the program panic with an out of memory error or something else?

ghost avatar Jul 06 '24 16:07 ghost

We'll close this out if there's no response within 2 weeks

jaitaiwan avatar Jul 08 '24 13:07 jaitaiwan