{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/13552","labels_url":"https://api.github.com/repos/docker/docker/issues/13552/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/13552/comments","events_url":"https://api.github.com/repos/docker/docker/issues/13552/events","html_url":"https://github.com/docker/docker/issues/13552","id":81964497,"number":13552,"title":"Memory Leak with Syslog Driver","user":{"login":"sschepens","id":3072509,"avatar_url":"https://avatars.githubusercontent.com/u/3072509?v=3","gravatar_id":"","url":"https://api.github.com/users/sschepens","html_url":"https://github.com/sschepens","followers_url":"https://api.github.com/users/sschepens/followers","following_url":"https://api.github.com/users/sschepens/following{/other_user}","gists_url":"https://api.github.com/users/sschepens/gists{/gist_id}","starred_url":"https://api.github.com/users/sschepens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschepens/subscriptions","organizations_url":"https://api.github.com/users/sschepens/orgs","repos_url":"https://api.github.com/users/sschepens/repos","events_url":"https://api.github.com/users/sschepens/events{/privacy}","received_events_url":"https://api.github.com/users/sschepens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"unclejack","id":1409668,"avatar_url":"https://avatars.githubusercontent.com/u/1409668?v=3","gravatar_id":"","url":"https://api.github.com/users/unclejack","html_url":"https://github.com/unclejack","followers_url":"https://api.github.com/users/unclejack/followers","following_url":"https://api.github.com/users/unclejack/following{/other_user}","gists_url":"https://api.github.com/users/unclejack/gists{/gist_id}","starred_url":"https://api.github.com/users/unclejack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unclejack/subscriptions","organizations_url":"https://api.github.com/users/unclejack/orgs","repos_url":"https://api.github.com/users/unclejack/repos","events_url":"https://api.github.com/users/unclejack/events{/privacy}","received_events_url":"https://api.github.com/users/unclejack/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-05-28T14:50:23Z","updated_at":"2015-06-30T13:27:19Z","closed_at":null,"body":"### Description of problem:\r\nI'm experiencing docker daemon using LOTS of memory when using syslog driver and container logging lots of messages per seconds.\r\nUsing syslog driver:\r\n```bash\r\n$ sudo docker run -d --log-driver syslog ubuntu:latest bash -c \"for i in \\$(seq 100000); do echo \\\"testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest\\\"; done\"\r\n```\r\nDocker daemon now consumes aproximately 40% (38.8%) of memory:\r\n```bash\r\n$ ps aux|grep docker| grep -v grep\r\nroot     32558  8.8 38.8 841024 395048 ?       Ssl  14:41   0:03 /usr/bin/docker -d\r\n```\r\n\r\nUsging json log driver:\r\n```bash\r\n$ sudo docker run -d ubuntu:latest bash -c \"for i in \\$(seq 100000); do echo \\\"testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest\\\"; done\"\r\n```\r\nDocker daemon consumes aproximately 2% (1.5%) of memory:\r\n```bash\r\n$ ps aux|grep docker| grep -v grep\r\nroot     32717 11.6  1.5 356052 15376 ?        Ssl  14:43   0:04 /usr/bin/docker -d\r\n```\r\n\r\nOS Info:\r\nI'm running docker in an EC2 t2.micro ubuntu server 14.04 instance:\r\n```bash\r\n$ uname -a\r\nLinux ip-172-31-32-169 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n```\r\n\r\n### Docker version:\r\n```bash\r\n$ docker version\r\nClient version: 1.6.2\r\nClient API version: 1.18\r\nGo version (client): go1.4.2\r\nGit commit (client): 7c8fca2\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.6.2\r\nServer API version: 1.18\r\nGo version (server): go1.4.2\r\nGit commit (server): 7c8fca2\r\nOS/Arch (server): linux/amd64\r\n```\r\n\r\n### Docker Info:\r\n```bash\r\n$ docker info\r\nContainers: 4\r\nImages: 4\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 12\r\n Dirperm1 Supported: false\r\nExecution Driver: native-0.2\r\nKernel Version: 3.13.0-48-generic\r\nOperating System: Ubuntu 14.04.2 LTS\r\nCPUs: 1\r\nTotal Memory: 992.5 MiB\r\nName: ip-172-31-32-169\r\nID: MKQ5:EPHS:PNVG:DS6X:JOCT:QIRW:ROW2:FI4J:LSAL:RPFD:ZOJX:S23P\r\nWARNING: No swap limit support\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/117183927","html_url":"https://github.com/docker/docker/issues/13552#issuecomment-117183927","issue_url":"https://api.github.com/repos/docker/docker/issues/13552","id":117183927,"user":{"login":"oncletom","id":138627,"avatar_url":"https://avatars.githubusercontent.com/u/138627?v=3","gravatar_id":"","url":"https://api.github.com/users/oncletom","html_url":"https://github.com/oncletom","followers_url":"https://api.github.com/users/oncletom/followers","following_url":"https://api.github.com/users/oncletom/following{/other_user}","gists_url":"https://api.github.com/users/oncletom/gists{/gist_id}","starred_url":"https://api.github.com/users/oncletom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oncletom/subscriptions","organizations_url":"https://api.github.com/users/oncletom/orgs","repos_url":"https://api.github.com/users/oncletom/repos","events_url":"https://api.github.com/users/oncletom/events{/privacy}","received_events_url":"https://api.github.com/users/oncletom/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T13:27:19Z","updated_at":"2015-06-30T13:27:19Z","body":"I also encounter such an error with Docker 1.7.0 and syslog driver enabled on an EC2 t2.micro instance.\r\n\r\nRecurrent error is: *Error response from daemon: Cannot start container 5cbc9625e9d954ebc6115e955de528617ca59d841e05b22a2f7b7e33e9e8120e: namespace creation reexec command failed: fork/exec /usr/bin/docker: cannot allocate memory*\r\n\r\nThe containers are chatty log-wise, we have 3 long-running one spawning ~500 ephemeral containers per hour.\r\n\r\n```bash\r\n$ docker version\r\nClient version: 1.7.0\r\nClient API version: 1.19\r\nGo version (client): go1.4.2\r\nGit commit (client): 0baf609\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.7.0\r\nServer API version: 1.19\r\nGo version (server): go1.4.2\r\nGit commit (server): 0baf609\r\nOS/Arch (server): linux/amd64\r\n```\r\n\r\n```bash\r\n$ docker info\r\nContainers: 3\r\nImages: 119\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 125\r\n Dirperm1 Supported: false\r\nExecution Driver: native-0.2\r\nLogging Driver: syslog\r\nKernel Version: 3.13.0-53-generic\r\nOperating System: Ubuntu 14.04.2 LTS\r\nCPUs: 1\r\nTotal Memory: 992.5 MiB\r\nName: ip-10-0-0-192\r\nID: L3LB:QZSG:F6GO:KSSJ:MJFJ:N7TV:ALPX:OHTN:JWXH:TEBP:AASQ:37FJ\r\nWARNING: No swap limit support\r\n```\r\n\r\n```bash\r\n$ free\r\n             total       used       free     shared    buffers     cached\r\nMem:       1016340     921332      95008        860      58864     134856\r\n-/+ buffers/cache:     727612     288728\r\nSwap:            0          0          0\r\n```"}}