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
Post Redirect Get Pattern in Rails
Accessing a Has_One Associations' Attributes
Ruby How to Merge Two CSV Files with Slightly Different Headers
How to Set Up the Recipient Id in Public Activity
Rails Routing - Custom Routes for Resources
How Are Respond_To and Respond_To_Missing Different
Importing CSV Data into Rails App, Using Something Other Then the Association "Id"
Building Gem, Executable Not Found
Fast-Stemmer Installation Problems
Exec the Cd Command in a Ruby Script
Unexpected Keyword_End, Expecting $End (Syntaxerror)
How to Change Environment Variables When Running Rspec for Ruby
Ruby Minitest Assert_Output Syntax
How to Define a Method in Ruby Using Splat and an Optional Hash at the Same Time
How to Make Rake Db:Migrate Generate Schema.Rb When Using :SQL Schema Format