[MDEV-7415] Query timeout expired' from CONNECT Created: 2015-01-07 Updated: 2015-03-07 Due: 2015-01-29 Resolved: 2015-01-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.0.13 |
| Fix Version/s: | 10.0.16 |
| Type: | Bug | Priority: | Major |
| Reporter: | Takuya Aoki (Inactive) | Assignee: | Olivier Bertrand |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS release 6.5 (X86_64) |
||
| Description |
|
My connect table is not working due to timeout reasons. /etc/odbc.ini
/etc/odbcinst.ini
test on isql
error on MariaDB
*.err file
|
| Comments |
| Comment by Elena Stepanova [ 2015-01-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Did you try to use QueryTimeout option in odbc.ini? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Takuya Aoki (Inactive) [ 2015-01-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I modified odbc.ini but symptoms did not change. /etc/odbc.ini
Since, isql is working I assume it is not an ODBC problem. In this case, the test on isql is returning the correct reply in 66 seconds, while the MariaDB returns the error in 27 seconds (shorter than isql). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-01-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Olivier, Can you advise on this? I don't see any connect-engine-specific parameters that could be related to the timeout, but I might well be missing something. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2015-01-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Indeed, CONNECT currently set the connection timeout and query timeout to their default values. The query timeout default value 600 (ten minutes) as said on some web site or 30 seconds on some others. Anyway it seems that for SQL Server it is called CommandTimeout. However the default connection timeout value is only 15 sec. It can be the culprit because CONNECT make a new connection on each query. This is the one that should be tested. I guess it can be specified in the ODBC.INI file or directly in the connection string using the keyword ConnectTimeout. If nothing works, I can try to add these as options to the ODBC table type. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Takuya Aoki (Inactive) [ 2015-01-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I changed both the odbc.ini file and connection string and added ConnectTimeout=600 The table definition is as below, CREATE OR REPLACE TABLE msv2_dmi_vCustomer2 I also tried CommandTimeout=600 Neither solved the problem. Can you try to make it a table option? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2015-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No wonder your trial to set timeout failed, CONNECT was unconditionally setting them to default values (15 and 15)
Normally, a DSN should reply fast enough. I did not get timeout conditions even setting the timeout value to 1 sec. If you still have timeout problems, be sure the DSN exists and is in operation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Takuya Aoki (Inactive) [ 2015-01-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for the fix, I will check the new release. Yes usually replies in a few seconds, but I was trying to access to a complicated view on a VPN server so it was taking time. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Takuya Aoki (Inactive) [ 2015-01-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I don't have the original environment at the moment so I did a reverse test to see how the option list works in 10.0.16 release.
record in log file(/var/lib/mysql/servername.err)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2015-01-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes it is bizarre. It is what I also noted in my last comment. By the way, does this make your original table to work? This was the first subject of this case. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Takuya Aoki (Inactive) [ 2015-01-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can't check right now but I will be able to soon. Not the query time but the time until a DSN replys matters, I guess. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Takuya Aoki (Inactive) [ 2015-01-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I found the original error occurs when I set QueryTimeout=1 with CONNECT table to a view on SQL server. On SQL server
On MariaDB 10.0.16
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Takuya Aoki (Inactive) [ 2015-03-07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I tested in the original environment where the below error occurred.
Changing the QueryTimeout value (I set it to 3600) solved the problem. |