Closed koresar closed 3 years ago
The connection timeout option is connectionTimeout
(instead of timeout
).
Why is it taking more than 2 seconds to connect to rippled -- is that what you expect? (Is your internet connection really that slow?)
The machine which is connecting to the rippled is very weak. It takes about 2.1 seconds to connect to r1 over the pacific ocean using websockets. 😅
On Thu., 30 Jan. 2020, 20:22 Elliot Lee, notifications@github.com wrote:
This is a bug (the timeout option isn't working) and we should fix it. But why is it taking more than 2 seconds to connect to rippled -- is that what you expect? (Is your internet connection really that slow?)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ripple/ripple-lib/issues/1196?email_source=notifications&email_token=AAMMELYNYBUGTMPQBT75UT3RAKL4VA5CNFSM4KNRW2NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKKIZLY#issuecomment-580160687, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMMEL62HWPO64AERUKSMF3RAKL4VANCNFSM4KNRW2NA .
Thanks. I think we should make the timeout option work, and we should also increase the default timeout to 5 seconds (5000 ms).
Would it make sense to remove timeout
and add requestTimeout
and connectionTimeout
to ripple api options?, with the default for connectionTimeout
set to 5000ms.
I’m happy either way — I’ve not needed to adjust the timeouts personally but I can see that being useful for some slower machines/networks.
I'm also experiencing this error, NotConnectedError: Error: connect() timed out after 2000 ms. If your internet connection is working, the rippled server may be blocked or inaccessible.
when running a test using S1 from DigitalOcean East.
It looks like the connectionTimeout
property adjusts this (and is included in the TypeScript types), but doesn't work because it's not included in the schema here.
In the meantime, this works for me:
// @ts-ignore
rippleClient.connection._config.connectionTimeout = 10000
Is this not a duplicate of issue #1174 ?
I wouldn't call these duplicates. But you one can be causing another.
The
api.connect()
does not respect thetimeout
option and rejects after 2000 ms. Here is the error message:Help!