lukaszlach / docker-tc

:whale: :vertical_traffic_light: Docker Traffic Control - network rate limiting, emulating delays, losses, duplicates, corrupts and reorders of network packets using only container labels or a command-line interface.
668 stars 38 forks source link

Memory leak in docker-tc.sh #3

Closed Silcet closed 5 years ago

Silcet commented 5 years ago

The command "docker events" continues listening for new events every time it is called, spawning a persistent new process in every loop of the main while in docker-tc.sh. After using the container for a while it ends up eating all the RAM of the host computer.

Silcet commented 5 years ago

I have made a fix for this on this pull request ;)

Silcet commented 5 years ago

The solution on the pull request doesn't work. I'll look into more options.

Silcet commented 5 years ago

The memory leak is produced only when 2 or more containers are spawned in the same network. This crashes the main loop and wakes it spawn again with a new docker events command. If issue #2 is fixed this one will be as well. Therefore I close this.