Closed marcinkoziej closed 7 years ago
Looks like too many clients connecting to Redis. We've already reduced the limit. Out of interest, which Redis provider are you using? Heroku?
yes, free heroku plan
Marcin Koziej
Akcja Demokracja Ϟ Radiofonia Ϟ Moko Velo Coop GPG key: http://koziej.cahoots.pl/gpg/ Twitter: @movonw
On 08/19/2016 01:45 PM, Max Woolf wrote:
Looks like too many clients connecting to Redis. We've already reduced the limit. Out of interest, which Redis provider are you using? Heroku?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/substrakt/letsencrypt-heroku/issues/15#issuecomment-240997348, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJkNc9oB-N0gi2h1QNrW5FoDkflpsr6ks5qhZdDgaJpZM4Jlb3b.
get '/certificate_generation/:token' do
authenticate!
content_type :json
$redis = Redis.new(url: ENV['REDIS_URL'])
output = {
token: params[:token],
status: $redis.get("#{params[:token]}_status"),
error: $redis.get("#{params[:token]}_error"),
domain: $redis.get("#{params[:token]}_domain"),
subdomains: $redis.get("#{params[:token]}_subdomains").split(','),
message: $redis.get("#{params[:token]}_message")
}.to_json
$redis.quit
output
end
This will fix the issue. A new redis client is being created every time the page is refreshed to check on progress but it isn't being closed.
Perfect @JaredPon. Could you submit a PR with that change please?
Maybe better to use Sidekiq.redis{ |conn| conn.get("...") }
?
Sidekiq uses connection_pool
, see: https://github.com/mperham/sidekiq/blob/v4.1.4/lib/sidekiq/redis_connection.rb
Should be enough: https://github.com/substrakt/letsencrypt-heroku/pull/18
While reloading generation status page i stumbled upon this error: