fog / fog-aws

Module for the 'fog' gem to support Amazon Web Services http://aws.amazon.com/
MIT License
296 stars 353 forks source link

Updated to rails 7.1.3.2 #708

Open casiodk opened 2 months ago

casiodk commented 2 months ago

And i get this error when trying to connect

Excon::Error::Socket: getnameinfo: Unknown error (Socket::ResolutionError) from /app/vendor/bundle/ruby/3.3.0/gems/excon-0.92.3/lib/excon/socket.rb:289:in `unpack_sockaddr_in'

geemus commented 2 months ago

@casiodk Hey, sorry to hear you are having issues.

As a first step, could you try updating the version of excon you are using? There have been quite a few releases since then, so if nothing else it will be easier to debug if the line numbers match up with the current version.

Also, do you know what URL is triggering this? Thanks.

casiodk commented 2 months ago

I am still having the issue with the newest version of excon. But only when i proxy through Quota Guard on heroku. This is the line that fails

bucket.files.create(key: key.gsub(%r{^/}, ''), body: file)

casiodk commented 2 months ago

And actually it uploads the file to s3, but then raises an error after the file has been uploaded?

casiodk commented 2 months ago

Any idea on this @geemus ?

geemus commented 2 months ago

Thanks for trying the bump. Given that I haven't seen this before, I do suspect Quota Guard may be involved somehow.

A few more questions:

Having it fail on socket stuff seems weird to me, as that should precede calls (which would mean that the file wouldn't get uploaded). Also, I don't think that a file create should result in subsequent calls over excon. The only exception I can think of off hand would be if excon/fog believed that the original upload failed. In that case, since file creation is idempotent it should auto-magically retry. It's possible that it mistakenly thinks there was a failure (even though it succeeded), and then retries and the failure we are seeing here is on a retry. Though I still don't know how/why we are seeing there error in that case. I'm hoping having more of the stacktrace may help narrow it down, but barring that we could try adding instrumentation.