-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Nats - Aerospike - Nginx - Websocket High Memory #1297
Comments
I use; Estimated active users; After a certain time, users drop. Average Subscribers 2500. |
what version go aerospike package? Suggest you use the go memory profiler to figure it out |
Aerospike client : https://github.com/aerospike/aerospike-client-go Suggest you use the go memory profiler to figure it out |
Start the server with
replace localhost and 6060 by the hostname where the server is running and the port you have selected in |
Thank you I will test and return again. |
Actually there were some reports of memory leak on the aerospike client you are using, so look at this issue to see how to use the mem profiler, or if you are affected by that issue: aerospike/aerospike-client-go#230 |
yes, I got the URL from the code, I am asking what version of it you are using in your go mod or how you compile it. |
I'm new in Golang. |
Since your modified version of the NATS Server includes the aerospike client, when building, Go should have updated the go.mod/sum. Could you paste the content of the go.mod file in this github issue? Thanks! |
[root@dev nats-server-2.1.4]# cat go.mod require ( go 1.13 |
[root@dev nats-server-2.1.4]# cat go.sum |
Thanks, seem to be version 2.7.2, which is not quite the latest, but 2.7.3 has only 1 change that I don't think would be related. |
Profiler; restart after nats-server. |
Tree Out; |
18mins after top command; |
so seems clear there's a leak in the client library for aerospike or something needs a clean up. I'd suggest perhaps reusing the aerospike client between calls? and asking that project about the leak or best use pattern |
At this point, you need to get this report to aerospike repo. They will know better what is causing the clone of these partitions and help you finding out if you are using their API properly and releasing all resources (I see that you call defer client.Close() - which by the way should be done after checking for error, not before), etc.. |
defer client.Close() how this usage should be? |
`func aerospikeGet(key string) bool {
}` same? |
You have this right now:
Well, if
But I am not saying that this is why you have the memory growth, just stating that the defer was not placed correctly. |
Just one defer after creating the client, but after checking for the error from |
Okey, trying after profiler watching... |
I use just now profiler watching. |
Tested after result; - The problem appears in the Aerospike client, then. |
Yes. I am sure they will be able to point out why these partitions are cloned and why the resources are not released. Closing for now, but appreciate if you can update with the resolution. Thanks! |
Hi,
Own uses;
Nats v2.1.4
Aerospike v4.8.0.5
Nginx
ws-tcp-relay : https://github.com/isobit/ws-tcp-relay
Custom;
Auth.go : https://gist.github.com/byazrail/b44c786ac1604d5699527554724fedc5
Nats Conf, Nginx, Systemd Services Conf : https://gist.github.com/byazrail/3ebe4b2c5a05eb8e7566066bf21a2a2e
It's problem;
The system works very well, but RAM is constantly increasing.
I have to reset nats-server after a while.
Do you have any suggestions on this subject?
The text was updated successfully, but these errors were encountered: