Docker Community Forums

Share and learn in the Docker community.

Docker memory leak due curl https request


(Craiem) #1

Hi,

We have a memory leak problem when we do a cURL request over HTTPS inside a docker container. The memory keeps increasing until the docker collapses. It doesn’t matter how much memory we assign as hard limit, it will fill up and collapse.

We found out the problem existed when doing a cURL request over HTTPS and not over HTTP, but we might have another problem anyway.

docker image: amazonlinux with php installed.

php example:

<? $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, "http://ipinfo.io/186.136.112.36/json"); $data = curl_exec($ch); curl_close($ch); var_dump($data); What can we do? Thanks!