Tinytds Error: Adaptive Server Connection Timed Out

TinyTds Error: Adaptive Server connection timed out

First, that pool size seems excessive. Are you using a ton of threads? If not, then only one connection will be used per app request/response. Just seems like that value is way to high.

Second, what SQL timed out? Have you found that certain SQL is slower than others? If so, then you have two options. The first would be to tune the DB using standard practices like indexes, etc. The second would be to increase the "timeout" option in your database.yml. The default timeout is 5000 which is 5 seconds. Have you tried setting it to 10000? I guess what I am asking is how are you sure this is a "connect" timeout vs a "wait" timeout?

Rails and Azure: TinyTds::Error: Adaptive Server connection failed

I need install FreeTDS by myself, if apt-get we can't pass the arguments of compilation:

wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz

$ tar -zxvf freetds-stable.tgz

$ cd freetds-0.91/

$ ./configure --with-tdsver=8.0 --with-openssl=/usr/bin

$ make

$ sudo make install

And now I can access my database:

$ tsql -C # OK!

$ TDSVER=8.0 tsql -H mydb.database.windows.net -p 1433 -U myuser@mydb -P mypassword -D mydb

And everything works when I run and access with Puma, Nginx and Capistrano.

See more here:

https://github.com/rails-sqlserver/tiny_tds/issues/266



Related Topics



Leave a reply



Submit