xkaraman left a comment (kamailio/kamailio#4231)
After some more testing and OS changing thanks to docker, we could see that the problem does not happen in `focal` and `bullseye` where `openssl <3.0`. **Bullseye:** ``` curl (7.74.0-1.3+deb11u15 openssl (1.1.1w-0+deb11u3 ``` **Focal:** ``` [curl 7.68.0-1ubuntu2.25](https://launchpad.net/ubuntu/+source/curl/7.68.0-1ubuntu2.25) (main) [openssl 1.1.1f-1ubuntu2.24](https://launchpad.net/ubuntu/+source/openssl/1.1.1f-1ubuntu2.24) (main) ```
Letting it both run with your exact config, they stayed stable for the whole duration.
Other OS, like `bookworm`, `jammy (22.04)` and `noble (24.04)` exhibit the same behaviour you described with increasing memory and ultimately running out of memory. They all have `openssl > 3.0` with curl versions varying.
Bookworm: ``` curl (7.88.1-10+deb12u12) openssl (3.0.16-1~deb12u1) ```
Jammy: ``` [curl 7.81.0-1ubuntu1.20](https://launchpad.net/ubuntu/+source/curl/7.81.0-1ubuntu1.20) (main) [openssl 3.0.2-0ubuntu1.19](https://launchpad.net/ubuntu/+source/openssl/3.0.2-0ubuntu1.19) (main) ```
Noble: ``` [curl 8.5.0-2ubuntu10.6](https://launchpad.net/ubuntu/+source/curl/8.5.0-2ubuntu10.6) (main) [openssl 3.0.13-0ubuntu3.5](https://launchpad.net/ubuntu/+source/openssl/3.0.13-0ubuntu3.5) (main) ```