{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/1034","labels_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1034/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1034/comments","events_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1034/events","html_url":"https://github.com/elixir-lang/ecto/issues/1034","id":112254385,"number":1034,"title":"Poolboy worker blocks poolboy to start connection if lazy: false","user":{"login":"fishcakez","id":2001229,"avatar_url":"https://avatars.githubusercontent.com/u/2001229?v=3","gravatar_id":"","url":"https://api.github.com/users/fishcakez","html_url":"https://github.com/fishcakez","followers_url":"https://api.github.com/users/fishcakez/followers","following_url":"https://api.github.com/users/fishcakez/following{/other_user}","gists_url":"https://api.github.com/users/fishcakez/gists{/gist_id}","starred_url":"https://api.github.com/users/fishcakez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fishcakez/subscriptions","organizations_url":"https://api.github.com/users/fishcakez/orgs","repos_url":"https://api.github.com/users/fishcakez/repos","events_url":"https://api.github.com/users/fishcakez/events{/privacy}","received_events_url":"https://api.github.com/users/fishcakez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elixir-lang/ecto/labels/Kind:Bug","name":"Kind:Bug","color":"fc2929"},{"url":"https://api.github.com/repos/elixir-lang/ecto/labels/Note:Discussion","name":"Note:Discussion","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-19T23:35:50Z","updated_at":"2015-10-23T22:38:05Z","closed_at":null,"body":"Starting connection in worker's `init/1` blocks poolboy while the connection is started. If the connection attempts to connect during start this will block poolboy.\r\n\r\nThe following adapters always block:\r\n* mysql\r\n* tds\r\n\r\nThe following adapters don't block by default but can be configured to block with `sync_connect: true`:\r\n* postgresql\r\n\r\nThe following adapters never block:\r\n* mongo\r\n\r\nThis issue will probably only have an impact if `max_overflow > 0`  and the adapter blocks in connect. However it will also slow startup time or restart time in the event of a crash.\r\n\r\nA potential fix is in the sbroker worker, which casts to self() to connect."},"comment":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/comments/150708851","html_url":"https://github.com/elixir-lang/ecto/issues/1034#issuecomment-150708851","issue_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1034","id":150708851,"user":{"login":"ericmj","id":316890,"avatar_url":"https://avatars.githubusercontent.com/u/316890?v=3","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T22:38:05Z","updated_at":"2015-10-23T22:38:05Z","body":"Sorry, I was confusing things. You are right that sync_connect is preferable with lazy.\r\n\r\n> I don't think we can drop lazy because of migrations? I remember wanting to drop it when introducing Ecto.Pools and could not.\r\n\r\nMigrations manually start and stop the repo now, are there other issues with migrations or did that fix the issue?"}}