Seems like those GBs of memory are used by ssl_gen_statem processes, which are Erlang processes to handle TLS.
As you can see, their overhead is quite small per-process (278kb in your environment), but given the number of connections,
it adds up. Most likely a large part of that can be reclaimed by garbage collection / process hibernation - they don't actually
need 278kb, they just accumulated some garbage when the connection was established and because, I assume, they are
mostly idle, garbage collection isn't triggered for them.
Things you can try:
1. Assuming the theory is correct, `rabbitmqctl force_gc` should release quite a lot of memory
2. If you have a test environment, try to request process hibernation after some time of idleness. Note that you have to use advanced.config for this
and you need to put all your ssl_options in it (otherwise ssl_options from advanced.config will overwrite your current options). It'd look something like this:
```
[
{rabbit, [
{ssl_options, [
{hibernate_after, 1000},
{keyfile,
"/etc/.../server_key.pem"},
{certfile,
"/etc/.../server_certificate.pem"},
{cacertfile,
"/etc/.../ca_certificate.pem"},
{verify,verify_none}]}
]}
].
```
The key part is the `hibernate_after`, but as I said - you need the rest as well (you can run `rabbitmqctl environment` to get your current settings
in the advanced/Erlang term format).
If you could try the above, it'd be great to confirm this solves the problem. On our side, we'll look into configuring this hibernate_after setting
by default, so that in the future, these processes use less memory without any manual adjustments.
Best,