Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory usage is pretty high compared to uws #1530

Closed
NishantDesai1306 opened this issue Mar 13, 2019 · 2 comments
Closed

memory usage is pretty high compared to uws #1530

NishantDesai1306 opened this issue Mar 13, 2019 · 2 comments

Comments

@NishantDesai1306
Copy link

NishantDesai1306 commented Mar 13, 2019

I am trying to create a pet project with small server with 1GB of RAM, my use-case includes comparatively small socket clients approx 75-100 and it requires constant data transfer from server to client (basically for a game so new updates are sent from server to client many times a second).

also although the number of socket clients are low the clients will disconnect/reconnect pretty frequently (basically players will leave and join the game pretty frequently at rate of about 5-10 player will leave and new players will join).

Till yesterday I was using uws but due to some issues I switched to ws but now every 2 HR my process runs out of memory, so is 1GB of memory enough for this lib to run smoothly or is there some specific config that I can use for this lib so that it works fine ?

by the way I am using it normally only like no additional options are give to socket server apart from port.

@lpinca
Copy link
Member

lpinca commented Mar 13, 2019

Yes definitely. 100 clients are literally nothing. with 1 GB you should be fine even with a few thousands. I don't know the details of your app and how much data you are sending but I suspect you have a leak somewhere.

@lpinca
Copy link
Member

lpinca commented Mar 13, 2019

Take a look at this discussion #617 if you are broadcasting the same data to all clients and permessage-deflate is disabled.

@lpinca lpinca closed this as completed Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants