title: Errno::ECONNRESET (Connection reset by peer - SSL_connect)
body: <p>our code is generating an exception on heroku server since the last few hours. It was working okay before that on the same server with the same code. </p>
  
  <p>The exception is <code>Errno::ECONNRESET (Connection reset by peer - SSL_connect)</code> heroku server.</p>
  
  <p>The line of code on which we are getting exception is:</p>
  
  <pre><code>response = http.request(request, json_data) 
  </code></pre>
  
  <p>What could be the possible reason/solution for this exception?</p>
  
  <pre><code>  def self.get_response_from_v2(url,json_data)
    http = Net::HTTP.new(url.host, 443)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    request = Net::HTTP::Post.new(url.path, {'Content-Type' =&gt; 'application/json'})
    request.basic_auth url.user, url.password if url.user
    response = http.request(request, json_data)
    result = JSON.parse(response.body)
    result
  end
  </code></pre>
  
  <p>We have tried the solutions:</p>
  
  <p><a href="https://stackoverflow.com/questions/12443258/ssl-connect-error-when-accessing-shopify-api-with-rubygem">SSL_connect error when accessing Shopify API with rubygem</a></p>