rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
607 stars 189 forks source link

Threads block on connect with poor connectivity #453

Closed atomical closed 4 years ago

atomical commented 4 years ago

I have 50 threads and each make a separate connection to a unique IP address, run a query, and return the result. There is no need for connection pooling in this scenario.

These servers have atrocious connectivity (unlike 99% of the common use cases for this gem where the server is readily available in a production environment). Only one thread is running at a time. Even with 50 threads I'm only seeing one timeout every 20 seconds.

All the connects use IP addresses so I don't think DNS resolution is blocking. Is this a known issue?

atomical commented 4 years ago

Found it: https://github.com/rails-sqlserver/tiny_tds/issues/421