You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ time ./connection_timeout.rb
./connection_timeout.rb:8:in `connect': Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements (Fb::Error)
Unable to complete network request to host "fakeurl.com".
Failed to establish a connection.
from ./connection_timeout.rb:8:in `<main>'
./connection_timeout.rb 0.07s user 0.02s system 0% cpu 4:16.76 total
The connection should probably bail after a certain amount of time. Ideally, this amount of time would be configurable in the connection hash. I'm not a C guy, so I'm not sure I'll be of any help.
The text was updated successfully, but these errors were encountered:
The gem is a wrapper around fbclient, which does not have a timeout setting, to my knowledge. Nor do we have access to the socket used by fbclient or we could specify a timeout on the socket. Fortunately, in practice, this is rarely a problem. Most database connections are local and fail quickly if they are going to fail.
As best I can tell, there is no timeout when establishing a connection. The following script ran for about 4 minutes on my machine:
When it finally did exit, this was the error:
The connection should probably bail after a certain amount of time. Ideally, this amount of time would be configurable in the connection hash. I'm not a C guy, so I'm not sure I'll be of any help.
The text was updated successfully, but these errors were encountered: