The symptom is:
TinyTds::Error: Adaptive Server connection timed out: EXEC some_stored_procedure
It's execute_procedure
a slow stored procedure on a slow MSSQL Server via ActiveRecord over tinytds
. If I EXEC
the stored procedure in SQL Query Analyzer, it takes 29 to 30 to finish.
So I added:
timeout = 60
in /etc/freetds.conf
and:
read_timeout: 60
write_timeout: 60
to database.yml
.
The same error still shows up. Is there any other configs I missed?
p.s. I did measure when the timeout error shows up with a timer after hitting return key, it's about 30 seconds. I have a feeling 30 seconds may not be the default timeout of freetds
or activerecord
and wonders why the error shows up somewhat close the time for the sql to finish ...