{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/30600","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/30600/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/30600/comments","events_url":"https://api.github.com/repos/docker/docker/issues/30600/events","html_url":"https://github.com/docker/docker/issues/30600","id":204392560,"number":30600,"title":"Error: read ECONNRESET (Between Ghost and MySQL)","user":{"login":"pascalandy","id":6694151,"avatar_url":"https://avatars.githubusercontent.com/u/6694151?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalandy","html_url":"https://github.com/pascalandy","followers_url":"https://api.github.com/users/pascalandy/followers","following_url":"https://api.github.com/users/pascalandy/following{/other_user}","gists_url":"https://api.github.com/users/pascalandy/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalandy/subscriptions","organizations_url":"https://api.github.com/users/pascalandy/orgs","repos_url":"https://api.github.com/users/pascalandy/repos","events_url":"https://api.github.com/users/pascalandy/events{/privacy}","received_events_url":"https://api.github.com/users/pascalandy/received_events","type":"User","site_admin":false},"labels":[{"id":392678049,"url":"https://api.github.com/repos/docker/docker/labels/area/swarm","name":"area/swarm","color":"fbca04","default":false},{"id":182417459,"url":"https://api.github.com/repos/docker/docker/labels/status/more-info-needed","name":"status/more-info-needed","color":"C6A49A","default":false},{"id":480238176,"url":"https://api.github.com/repos/docker/docker/labels/version/1.13","name":"version/1.13","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-31T19:01:52Z","updated_at":"2017-02-01T02:56:01Z","closed_at":null,"body":"### GENERAL SUPPORT INFORMATION\r\n\r\nI run Docker Swarm Mode 1.13\r\nI run percona (mysql) and [Ghost](https://hub.docker.com/_/ghost/).\r\nIt's running good and I can do everthing you expect from a CMS application.\r\n\r\n### BUG REPORT INFORMATION\r\nBut it seems that when the blog have no queries for over 30 minutes, the connection breaks. \r\nTo fix this I need to refresh the page 2 times and I goes back to normal. \r\n\r\n**My question**: Can you help me to debug this issue ?\r\n\r\n**Description**\r\n\r\n\r\n```\r\n`docker logs myghostcontainer`\r\n\r\nERROR: select count(distinct posts.id) as aggregate from `posts` where `posts`.`status` = 'published' and `posts`.`page` = false - read ECONNRESET\r\n Rendering Error Page\r\n Ghost caught a processing error in the middleware layer.\r\n Error: read ECONNRESET\r\n    at exports._errnoException (util.js:907:11)\r\n    at TCP.onread (net.js:558:26)\r\n    --------------------\r\n    at Protocol._enqueue (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:110:48)\r\n    at Connection.query (/usr/src/app/node_modules/mysql/lib/Connection.js:165:25)\r\n    at /usr/src/app/node_modules/knex/lib/dialects/mysql/index.js:152:18\r\n    at Promise._execute (/usr/src/app/node_modules/bluebird/js/release/debuggability.js:300:9)\r\n    at Promise._resolveFromExecutor (/usr/src/app/node_modules/bluebird/js/release/promise.js:481:18)\r\n    at new Promise (/usr/src/app/node_modules/bluebird/js/release/promise.js:77:14)\r\n    at Client_MySQL._query (/usr/src/app/node_modules/knex/lib/dialects/mysql/index.js:146:12)\r\n    at Client_MySQL.query (/usr/src/app/node_modules/knex/lib/client.js:189:17)\r\n    at Runner.<anonymous> (/usr/src/app/node_modules/knex/lib/runner.js:138:36)\r\n    at Runner.tryCatcher (/usr/src/app/node_modules/bluebird/js/release/util.js:16:23)\r\n    at Runner.query (/usr/src/app/node_modules/bluebird/js/release/method.js:15:34)\r\n    at /usr/src/app/node_modules/knex/lib/runner.js:61:21\r\n    at tryCatcher (/usr/src/app/node_modules/bluebird/js/release/util.js:16:23)\r\n    at /usr/src/app/node_modules/bluebird/js/release/using.js:185:26\r\n    at tryCatcher (/usr/src/app/node_modules/bluebird/js/release/util.js:16:23)\r\n    at Promise._settlePromiseFromHandler (/usr/src/app/node_modules/bluebird/js/release/promise.js:510:31)\r\n    at Promise._settlePromise (/usr/src/app/node_modules/bluebird/js/release/promise.js:567:18)\r\n    at Promise._settlePromise0 (/usr/src/app/node_modules/bluebird/js/release/promise.js:612:10)\r\n    at Promise._settlePromises (/usr/src/app/node_modules/bluebird/js/release/promise.js:691:18)\r\n    at Promise._fulfill (/usr/src/app/node_modules/bluebird/js/release/promise.js:636:18)\r\n    at PromiseArray._resolve (/usr/src/app/node_modules/bluebird/js/release/promise_array.js:125:19)\r\n    at PromiseArray._promiseFulfilled (/usr/src/app/node_modules/bluebird/js/release/promise_array.js:143:14)\r\n    at Promise._settlePromise (/usr/src/app/node_modules/bluebird/js/release/promise.js:572:26)\r\n```\r\n\r\nWhen I refresh my browser two times, it back to normal:\r\n\r\n```\r\n`docker logs myghostcontainer`\r\n\r\n173.176.62.36 - - [31/Jan/2017:16:27:22 +0000] \"GET / HTTP/1.1\" 200 - \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36\"\r\n149.154.167.163 - - [31/Jan/2017:16:28:01 +0000] \"GET / HTTP/1.1\" 200 - \"-\" \"TelegramBot (like TwitterBot)\"\r\n173.176.62.36 - - [31/Jan/2017:16:30:14 +0000] \"GET / HTTP/1.1\" 200 - \"-\" \"Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1\"\r\n173.176.62.36 - - [31/Jan/2017:18:45:00 +0000] \"GET /services/ HTTP/1.1\" 200 - \"http://edinoblog.cloudwait.com/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36\"\r\n173.176.62.36 - - [31/Jan/2017:18:45:59 +0000] \"GET /services/ HTTP/1.1\" - - \"http://edinoblog.cloudwait.com/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36\"\r\n173.176.62.36 - - [31/Jan/2017:18:46:55 +0000] \"GET / HTTP/1.1\" - - \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36\"\r\n```\r\n\r\n\r\n### Steps to reproduce the issue:**\r\n1. Deploy Mysql (percona)\r\n2. Deploy Ghost (0.11.4)\r\n3. Do not query Ghost for about 30 minutes.\r\n\r\n\r\n### Output of `docker version`:**\r\n\r\nClient:\r\n Version:      1.13.0\r\n API version:  1.25\r\n Go version:   go1.7.3\r\n Git commit:   49bf474\r\n Built:        Tue Jan 17 09:58:26 2017\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.13.0\r\n API version:  1.25 (minimum version 1.12)\r\n Go version:   go1.7.3\r\n Git commit:   49bf474\r\n Built:        Tue Jan 17 09:58:26 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: false\r\n```\r\n\r\n### Output of `docker info`:\r\n\r\n```\r\nContainers: 6\r\n Running: 4\r\n Paused: 0\r\n Stopped: 2\r\nImages: 14\r\nServer Version: 1.13.0\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 78\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host macvlan null overlay\r\nSwarm: active\r\n NodeID: izjhpmacq0mafrf4l60qyfpvw\r\n Is Manager: true\r\n ClusterID: utjx7z2cjp94jbsyafyufud7s\r\n Managers: 1\r\n Nodes: 3\r\n Orchestration:\r\n  Task History Retention Limit: 5\r\n Raft:\r\n  Snapshot Interval: 10000\r\n  Number of Old Snapshots to Retain: 0\r\n  Heartbeat Tick: 1\r\n  Election Tick: 3\r\n Dispatcher:\r\n  Heartbeat Period: 5 seconds\r\n CA Configuration:\r\n  Expiry Duration: 3 months\r\n Node Address: 10.3.128.19\r\n Manager Addresses:\r\n  10.3.128.19:2377\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e\r\nrunc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e\r\ninit version: 949e6fa\r\nSecurity Options:\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.8.14-docker-2\r\nOperating System: Ubuntu 16.04.1 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 1.954 GiB\r\nName: N01-par1-dev-d\r\nID: 7I6L:WW3U:X26O:VYZI:3HZP:H4YU:T73C:SYME:PGZW:VZNR:OZCF:LFAQ\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nLabels:\r\n provider=scaleway(VC1S)\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nVPS on scaleway"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/276559844","html_url":"https://github.com/docker/docker/issues/30600#issuecomment-276559844","issue_url":"https://api.github.com/repos/docker/docker/issues/30600","id":276559844,"user":{"login":"pascalandy","id":6694151,"avatar_url":"https://avatars.githubusercontent.com/u/6694151?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalandy","html_url":"https://github.com/pascalandy","followers_url":"https://api.github.com/users/pascalandy/followers","following_url":"https://api.github.com/users/pascalandy/following{/other_user}","gists_url":"https://api.github.com/users/pascalandy/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalandy/subscriptions","organizations_url":"https://api.github.com/users/pascalandy/orgs","repos_url":"https://api.github.com/users/pascalandy/repos","events_url":"https://api.github.com/users/pascalandy/events{/privacy}","received_events_url":"https://api.github.com/users/pascalandy/received_events","type":"User","site_admin":false},"created_at":"2017-02-01T02:56:01Z","updated_at":"2017-02-01T02:56:01Z","body":"Sure Andrea! There is 3 nodes. \r\n\r\n```\r\nID                           HOSTNAME        STATUS  AVAILABILITY  MANAGER STATUS\r\n2wwk6ylidgvcsheuxhpaob42h    N11-par1-dev-d  Ready   Active\r\n35c2v83wn4h9gmuulr8jcztvw    N12-par1-dev-d  Ready   Active\r\nizjhpmacq0mafrf4l60qyfpvw *  N01-par1-dev-d  Ready   Active        Leader\r\n```\r\n\r\n2 networks:\r\n```\r\nucjtg6tpsy7h        NETW_db             overlay             swarm\r\nrg5mq9en864n        NETW_front          overlay             swarm\r\n```\r\n\r\n4 containers\r\n\r\n```\r\ndocker service ls\r\nID            NAME        MODE        REPLICAS  IMAGE\r\n6rpkhabild1j  mysql       replicated  1/1       devmtl/percona-fire:5.7.16-10-1\r\nn3m7sxkz91ws  traefik     global      1/1       traefik:v1.1.2-alpine\r\nbpcfa7hxels4  g99999001   replicated  1/1       devmtl/ghost-base:edge_2017-01-31_14-40\r\nyiavnks8nyhv  g99999025   replicated  1/1       devmtl/ghost-base:edge_2017-01-31_14-40\r\n```\r\n\r\nThe key here is the `Error: read ECONNRESET`. It’s like the **Ghost ctn** can’t find the **Mysql ctn **on the first request (when it’s was on idle for about 30 min). The second request make the blog work normally.\r\n\r\nI’ve been messing with this since few weeks now, so I’m welling to do every possible action to resolve this :) Let me know if you need something else to work with.\r\n\r\nCheers!"}}
{"actor":{"display_login":"pascalandy"}}