Questions tagged [excon]

Excon is a usable, fast, and simple HTTP 1.1 library for Ruby.

Excon is a usable, fast, and simple HTTP 1.1 library for Ruby. It works great as a general HTTP(S) client and is particularly well suited to usage in API clients. The sources are placed at github.

28 questions
17
votes
2 answers

Why am I getting intermittent Excon::Error::Socket: getaddrinfo: No address associated with hostname (SocketError)?

Rails 4 - Ruby 2.2.2 - Amazon AWS S3 - dragonfly 1.0.12 - dragonfly-s3_data_store 1.2 - fog-aws 0.10.0 Around 99% of the time we have no issues. The issue usually only happens during times when usage is high but I noticed it happen when there were…
Peter Black
  • 1,142
  • 1
  • 11
  • 29
8
votes
2 answers

Ruby Backup gem failing when uploading to S3. connection reset after 37 min

The backups are 250MB. I don't think that's very big, but it appears the problem is increasing with the size. Log from the Backup gem below. Note the time span; about 37 min into the uploading I get connection reset. [2015/10/30 09:20:40][message]…
oma
  • 38,642
  • 11
  • 71
  • 99
7
votes
1 answer

Carrierwave + S3 Storage + Counter Cache Taking too Long

I have a simple app that receives POSTed images via an API and sends them to S3, via Carrierwave. My Photos table has a counter_cache as well. 80% of the time my transaction time is HUGE, like 60 seconds or more, and more than 90% of this time is…
Rafael Oliveira
  • 2,823
  • 4
  • 33
  • 50
6
votes
1 answer

Rails: sporadic Carrierwave/Excon errors

Using carrierwave for our uploaders, we get a couple of Excon errors each week from our production app. For example: Excon::Errors::BadRequest: Expected(200) <=> Actual(400 Bad Request) excon.error.response :body => "
lobati
  • 9,284
  • 5
  • 40
  • 61
5
votes
1 answer

Faraday with net-http-persistent leaves connections open, resulting in "Errno::EMFILE: Too many open files"

We have a process (Rake task) that runs for a long period of time, making HTTPS requests to remote hosts using Faraday with the net_http_persistent adapter. After several hours to days of runtime, it stops making requests. The process is also making…
Robin Daugherty
  • 7,115
  • 4
  • 45
  • 59
5
votes
2 answers

Mandrill-api Excon::Errors::SocketError

I am using Mandrill-api in Ruby to programmatically send out transactional email. I have (more or less) the following line in my rails app, mandrill ||= Mandrill::API.new const(:API)[:MANDRILL_APIKEY] ... (constructing the message, content,…
Jimmy Chu
  • 972
  • 8
  • 27
5
votes
2 answers

Bundler could not find compatible versions for gem "excon" for gem mandrill-api

I'm getting this error when trying to install bundle. I have both versions '0.15.4' and '0.25.1' of gem excon in my gemset. How can I fix this? Bundler could not find compatible versions for gem "excon": In Gemfile: mandrill-api (>= 0) ruby…
vitthal-gaikwad
  • 1,184
  • 11
  • 13
3
votes
1 answer

Excon::Error::Socket: end of file reached (EOFError), neography gem

I have been using neography gem for my rails project and sometimes I end up getting the following error: #error inspect Could someone help me troubleshooting this error? Also I am not able to…
Bist S
  • 41
  • 1
  • 1
  • 4
3
votes
1 answer

Excon::Errors::Timeout: connect timeout reached

I am using sidekiq to send mails through Mandrill Apis. It was working all fine. But from past few days I am receiving timeout errors in sidekiq while job try to deliver mail randomly. Excon::Errors::Timeout: connect timeout reached I am unable…
user2606741
  • 51
  • 1
  • 4
2
votes
1 answer

Excon::Errors::SocketError in PostsController#create

I'm setting up a photo blog with Rails and am having difficulty with this error: Excon::Errors::SocketError in PostsController#create Connection reset by peer (Errno::ECONNRESET) Extracted source (around line #30): respond_to do |format| if…
TS11
  • 75
  • 9
2
votes
1 answer

How to solve "Connection refused - connect(2) (Errno::ECONNREFUSED) (Excon::Errors::SocketError)"?

I cannot get my Ruby on Rails app to start anymore. For no apparent reason, any command such as "rails s", "rake db:migrate", "thin start", etc now triggers the following exception : Connection refused - connect(2) (Errno::ECONNREFUSED)…
Pierre
  • 176
  • 1
  • 9
2
votes
3 answers

When saving a file to RackSpace CloudFiles using Paperclip/Fog, a timeout occurs, when connecting to odd IP address

I have an app that stores images on RackSpace CloudFiles using Paperclip. It's been working fine, but recently it won't save files. The error that occurs is: Excon::Errors::SocketError (Connection timed out - connect(2) for 94.236.107.224:443…
Colin
  • 784
  • 2
  • 8
  • 21
2
votes
0 answers

Excon not recognising my SSL route

When pushing to Heroku, my db:migrate failed at the following: ! Heroku client internal error. Error: Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or…
Benji Lanyado
  • 239
  • 1
  • 3
  • 12
1
vote
2 answers

How can I trap errors correctly in a Sidekiq worker when testing with RSpec?

I have a relatively simple worker that uses Excon to grab something from the internet. I'm trying to be a good tester and use Webmock to force stubbing of the internet interactions, so that I'm actually testing what the code should do based on…
Erik Jacobs
  • 841
  • 3
  • 7
  • 19
1
vote
1 answer

Rails + Heroku: Excon Expected([200, 201, 202, 204, 206, 304]) <=> Actual(422 Unprocessable Entity)

My Rails application, deployed in Heroku, uses some rake tasks I have defined and scheduled to be executed once a day. Very simple tasks that the only thing they do, is add some jobs to the DelajedJobs table, so a worker gets up and execute…
unmultimedio
  • 1,224
  • 2
  • 13
  • 39
1
2