vendredi 18 décembre 2015

sidekiq imgkit niginx and unicorn upstream prematurely closed connection while reading response header from upstream

Calling InviteByEmailWorker background job in the action.

def invitebyemails
    InviteByEmailWorker.perform_async(@invitation.id, @current_user, @subject, @emails)
        redirect_to "/invitation/step3"
    else
        redirect_to invitation_index_path
    end
end

Sidekiq worker

class InvitationWorker
  include Sidekiq::Worker
  sidekiq_options worker: "high"
  include InvitationHelper
  def perform(invitation_id)
    p 'Sidekiq started'
    invitation = Invitation.find(invitation_id)
    invitation.snapshot = img_kit("http://ift.tt/1YmshS7}")
    invitation.save
    p 'Sidekiq end'
  end
end

In worker im taking imgkit snapshot, im getting below response.

*54 upstream prematurely closed connection while reading response header from upstream, client: 139.162.28.81, server: www.grouptable.net, request: "GET /invitation/snap-page/489 HTTP/1.1", upstream: "http://unix:/tmp/unicorn.grouptable_production.sock:/invitation/snap-page/489", host: "www.grouptable.net"

Thanks for help...

Aucun commentaire:

Enregistrer un commentaire