{"action":"created","issue":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/2655","labels_url":"https://api.github.com/repos/mperham/sidekiq/issues/2655/labels{/name}","comments_url":"https://api.github.com/repos/mperham/sidekiq/issues/2655/comments","events_url":"https://api.github.com/repos/mperham/sidekiq/issues/2655/events","html_url":"https://github.com/mperham/sidekiq/issues/2655","id":116432411,"number":2655,"title":"If a job has a :pool option, the corresponding redis connection is serialized with that job","user":{"login":"mnarayan01","id":1449781,"avatar_url":"https://avatars.githubusercontent.com/u/1449781?v=3","gravatar_id":"","url":"https://api.github.com/users/mnarayan01","html_url":"https://github.com/mnarayan01","followers_url":"https://api.github.com/users/mnarayan01/followers","following_url":"https://api.github.com/users/mnarayan01/following{/other_user}","gists_url":"https://api.github.com/users/mnarayan01/gists{/gist_id}","starred_url":"https://api.github.com/users/mnarayan01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnarayan01/subscriptions","organizations_url":"https://api.github.com/users/mnarayan01/orgs","repos_url":"https://api.github.com/users/mnarayan01/repos","events_url":"https://api.github.com/users/mnarayan01/events{/privacy}","received_events_url":"https://api.github.com/users/mnarayan01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-11T22:11:59Z","updated_at":"2015-11-11T22:13:26Z","closed_at":null,"body":"If a particular `Sidekiq::Worker` instance is given the `\"pool\"` option, the corresponding `Sidekiq::RedisConnection` will be serialized as the `\"pool\"` attribute for each queued job. This two consequences:\r\n\r\n1.  A ton of memory is consumed as the serialized `Sidekiq::RedisConnection` is quite large.\r\n2.  `Sidekiq::RedisConnection` is sometimes un-serializable (`Redis::Future` does not respond to `#respond_to?`).\r\n\r\nMy initial impression is that the pool is not needed, and simply gets thrown in via calls to [`Sidekiq::Client::normalized_hash`](https://github.com/mperham/sidekiq/blob/v3.5.3/lib/sidekiq/client.rb#L228-L235). This impression is enhanced by the fact that `Sidekiq::Middleware::Server::RetryJobs#attempt_retry` does not _appear_ to use it (ref https://github.com/mperham/sidekiq/blob/v3.5.3/lib/sidekiq/middleware/server/retry_jobs.rb#L128-L130)."},"comment":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/comments/155926260","html_url":"https://github.com/mperham/sidekiq/issues/2655#issuecomment-155926260","issue_url":"https://api.github.com/repos/mperham/sidekiq/issues/2655","id":155926260,"user":{"login":"mperham","id":2911,"avatar_url":"https://avatars.githubusercontent.com/u/2911?v=3","gravatar_id":"","url":"https://api.github.com/users/mperham","html_url":"https://github.com/mperham","followers_url":"https://api.github.com/users/mperham/followers","following_url":"https://api.github.com/users/mperham/following{/other_user}","gists_url":"https://api.github.com/users/mperham/gists{/gist_id}","starred_url":"https://api.github.com/users/mperham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mperham/subscriptions","organizations_url":"https://api.github.com/users/mperham/orgs","repos_url":"https://api.github.com/users/mperham/repos","events_url":"https://api.github.com/users/mperham/events{/privacy}","received_events_url":"https://api.github.com/users/mperham/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T22:13:26Z","updated_at":"2015-11-11T22:13:26Z","body":"Yes, IMO this option needs to go away."}}