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

remote_console cause atom leaks on target node #732

Closed
elmirk opened this issue Jun 14, 2019 · 5 comments
Closed

remote_console cause atom leaks on target node #732

elmirk opened this issue Jun 14, 2019 · 5 comments

Comments

@elmirk
Copy link

elmirk commented Jun 14, 2019

Hi!
May be this is not an issue, but...
I use .../bin/myapp foreground to start release (target node),
then I connect to release with ../bin/myapp remote_console
and every time when I do connecting to running release with remote console there is atoms leak on target node.

As I understand there is two reasons:
1 - because used random id's for remote console
2 - because nodetool use
append_node_suffix(Name, Suffix) ->
case re:split(Name, "@", [{return, list}, unicode]) of
[Node, Host] ->
list_to_atom(lists:concat([Node, Suffix, os:getpid(), "@", Host]));
[Node] ->
list_to_atom(lists:concat([Node, Suffix, os:getpid()]))
end.

When I modify start script to not use random id but use predefined (for my case only one remote_console could be used at the moment) and also remove os:getpid() from nodetool escript - now there is no growing atoms number in target node.

Are there another way to do this with some configuration?

thanks!

@tsloughter
Copy link
Member

Not currently. But a way to set the name of the node with an environment variable makes sense. Where it uses the random name if one isn't set.

@elmirk
Copy link
Author

elmirk commented Jun 17, 2019

ok. I see.

@elmirk elmirk closed this as completed Jun 17, 2019
@zsoci
Copy link

zsoci commented Apr 30, 2021

It happened at our site. I would keep the fix name and use the ENV-var if there is one. It is a bit frightening to have a tool that in long run fills up the atom table.

@tsloughter
Copy link
Member

@zsoci in case you didn't see it #868 will fix this. But also with OTP 23.1 and above the issue will not exist because it does not use nodetool for communicating to the running node anymore.

@zsoci
Copy link

zsoci commented May 14, 2021

Thanks @tsloughter . We can live with #868 as it limins the new atoms to #ofnodes*1000. Moving to 23 is not simple as the issue is happening on our prod riak cluster (up and running for years) running on R16. Well we will try to use a generated script to see.

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

3 participants