We should disable the use of SSL_MODE_RELEASE_BUFFERS in ASIO in MongoDB.
According to https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_mode.html, SSL_MODE_RELEASE_BUFFERS :
When we no longer need a read buffer or a write buffer for a given SSL, then release the memory we were using to hold it. Using this flag can save around 34k per idle SSL connection. This flag has no effect on SSL v2 connections, or on DTLS connections.
If we have 30k idle connections, that works out to 1 GB of data.