{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/1833","repository_url":"https://api.github.com/repos/tgriesser/knex","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/1833/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/1833/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/1833/events","html_url":"https://github.com/tgriesser/knex/issues/1833","id":195940904,"node_id":"MDU6SXNzdWUxOTU5NDA5MDQ=","number":1833,"title":"Reconnecting after database server disconnect/reconnect","user":{"login":"ty10r","id":4532146,"node_id":"MDQ6VXNlcjQ1MzIxNDY=","avatar_url":"https://avatars3.githubusercontent.com/u/4532146?v=4","gravatar_id":"","url":"https://api.github.com/users/ty10r","html_url":"https://github.com/ty10r","followers_url":"https://api.github.com/users/ty10r/followers","following_url":"https://api.github.com/users/ty10r/following{/other_user}","gists_url":"https://api.github.com/users/ty10r/gists{/gist_id}","starred_url":"https://api.github.com/users/ty10r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ty10r/subscriptions","organizations_url":"https://api.github.com/users/ty10r/orgs","repos_url":"https://api.github.com/users/ty10r/repos","events_url":"https://api.github.com/users/ty10r/events{/privacy}","received_events_url":"https://api.github.com/users/ty10r/received_events","type":"User","site_admin":false},"labels":[{"id":303314920,"node_id":"MDU6TGFiZWwzMDMzMTQ5MjA=","url":"https://api.github.com/repos/tgriesser/knex/labels/More%20information%20requested","name":"More information requested","color":"d4c5f9","default":false},{"id":23356638,"node_id":"MDU6TGFiZWwyMzM1NjYzOA==","url":"https://api.github.com/repos/tgriesser/knex/labels/bug","name":"bug","color":"fc2929","default":true},{"id":722495428,"node_id":"MDU6TGFiZWw3MjI0OTU0Mjg=","url":"https://api.github.com/repos/tgriesser/knex/labels/help%20wanted","name":"help wanted","color":"75eaad","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":58,"created_at":"2016-12-15T23:10:02Z","updated_at":"2018-10-29T16:48:03Z","closed_at":null,"author_association":"NONE","body":"I searched through the issues to find if others are having trouble attempting to reconnect.\r\n\r\nIt's been a very long time since these two:\r\nhttps://github.com/tgriesser/knex/issues/1341\r\nhttps://github.com/tgriesser/knex/issues/936\r\n\r\nMost of the suggestions I have seen in the issues so far are relying on `pool2` and include configuration for `requestTimeout`.\r\n\r\nI am on version `0.12.2` of knex, which no longer uses `pool2`. I also can no longer see implementation of `ping` in `src/client.js`.\r\n\r\nI'm running tests where I use docker to run these steps:\r\n\r\n1) Spin up postgres db in container.\r\n2) Start knex/connect to postgres.\r\n3) Run a test query, evaluate success.\r\n4) Stop postgres db in container.\r\n5) Run test query again, evaluate failure (with config: `{pool: {acquireTimeoutMillis: XXXX}, acquireConnectionTimeout: XXXX)\r\n6) Restart postgres db in container.\r\n7) Run test query again, evaluate success.\r\n\r\nStep 7 is failing in the same way step 5 does.\r\n\r\nI assumed knex would automatically attempt to reconnect. Is there a way I can cause a reconnection?\r\n\r\nIf you'd like, I can post this question instead at one of the past conversations on reconnection. I thought it was worth having a new conversation since most of the other conversations include only answers from before switching to `generic-pool`."},"comment":{"url":"https://api.github.com/repos/tgriesser/knex/issues/comments/433986762","html_url":"https://github.com/tgriesser/knex/issues/1833#issuecomment-433986762","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/1833","id":433986762,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzk4Njc2Mg==","user":{"login":"smulesoft","id":23746912,"node_id":"MDQ6VXNlcjIzNzQ2OTEy","avatar_url":"https://avatars2.githubusercontent.com/u/23746912?v=4","gravatar_id":"","url":"https://api.github.com/users/smulesoft","html_url":"https://github.com/smulesoft","followers_url":"https://api.github.com/users/smulesoft/followers","following_url":"https://api.github.com/users/smulesoft/following{/other_user}","gists_url":"https://api.github.com/users/smulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/smulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smulesoft/subscriptions","organizations_url":"https://api.github.com/users/smulesoft/orgs","repos_url":"https://api.github.com/users/smulesoft/repos","events_url":"https://api.github.com/users/smulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/smulesoft/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T16:48:03Z","updated_at":"2018-10-29T16:48:03Z","author_association":"CONTRIBUTOR","body":"Thanks for the info. Then we should wait until we have a way to reproduce this consistently and then debug the problem..."}}
{"actor":{"display_login":"smulesoft"}}