Make timeouts for TypeServer configurable #755
Merged
+6
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were testing out YugabyteDB with nodes in Australia, France, and the Eastern US and found that Postgrex connections were consistently failing to startup when connecting to nodes in France or Australia if we wanted to have a pool size greater than one.
The root cause is that the bootstrap queries Postgrex makes are taking a lot longer than the 60 seconds the TypeServer allows while a connection is waiting to get the lock.
This is because the first query of a connection forces the node to cache cluster information from the leader node, which can take a long time when the leader is on the opposite side of the world.
Yugabyte has "smart" drivers that are able to work around this issue, but there isn't one in Elixir so the simplest solution would be us being able to raise this timeout to a much higher number.