{"action":"opened","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18057","labels_url":"https://api.github.com/repos/docker/docker/issues/18057/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18057/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18057/events","html_url":"https://github.com/docker/docker/issues/18057","id":117529843,"number":18057,"title":"log without '\\n' cause the docker-daemon's memory overload","user":{"login":"cloudfly","id":774607,"avatar_url":"https://avatars.githubusercontent.com/u/774607?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudfly","html_url":"https://github.com/cloudfly","followers_url":"https://api.github.com/users/cloudfly/followers","following_url":"https://api.github.com/users/cloudfly/following{/other_user}","gists_url":"https://api.github.com/users/cloudfly/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfly/subscriptions","organizations_url":"https://api.github.com/users/cloudfly/orgs","repos_url":"https://api.github.com/users/cloudfly/repos","events_url":"https://api.github.com/users/cloudfly/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-18T07:21:33Z","updated_at":"2015-11-18T07:21:33Z","closed_at":null,"body":"docker version:\r\n```\r\nClient:\r\n Version:      1.9.0\r\n API version:  1.21\r\n Go version:   go1.4.2\r\n Git commit:   76d6bc9\r\n Built:        Tue Nov  3 18:00:05 UTC 2015\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.9.0\r\n API version:  1.21\r\n Go version:   go1.4.2\r\n Git commit:   76d6bc9\r\n Built:        Tue Nov  3 18:00:05 UTC 2015\r\n OS/Arch:      linux/amd64\r\n```\r\nReproduce command:\r\n\r\n```\r\ndocker run -d --log-driver=syslog centos /bin/bash -c 'while true;do echo -n hello; done;'\r\n```\r\ncode here: https://github.com/docker/docker/blob/master/daemon/logger/copier.go#L47\r\n\r\nif a container always print logs without `\\n`, then docker will buffer the logs until it find the `\\n`\r\n\r\nthis makes docker-daemon use up all the memory. \r\n\r\nI think the condition should be:  find a `\\n` **or** the buffer reached `64k`(or smaller).  \r\n\r\n"}}