[ZBX-6797] Database monitor does not use Timeout option Created: 2013 Jul 16  Updated: 2017 May 30  Resolved: 2013 Jul 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.0.7rc1, 2.2.0
Fix Version/s: 2.0.8rc1, 2.1.2

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: odbc, timeout
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBXNEXT-1050 SQL_LOGIN_TIMEOUT configuration Closed

 Description   

We use hardcoded timeout only for a connection. It is 5 seconds.

Zabbix should use "Timeout" option for all steps:

  • SQL_ATTR_QUERY_TIMEOUT
  • SQL_ATTR_CONNECTION_TIMEOUT
  • SQL_ATTR_LOGIN_TIMEOUT


 Comments   
Comment by Andris Mednis [ 2013 Jul 25 ]

Examining source code of ODBC drivers for PostgreSQL (files psqlodbc-09.02.0100/pgapi30.c and psqlodbc-09.02.0100/options.c) and MySQL (file mysql-connector-odbc-5.2.5-src/driver/options.c) shows that for both databases their ODBC drivers:

  • support SQL_ATTR_LOGIN_TIMEOUT,
  • do not support SQL_ATTR_CONNECTION_TIMEOUT,
  • do not support SQL_ATTR_QUERY_TIMEOUT.

Are there better ODBC drivers ?

Comment by Andris Mednis [ 2013 Jul 29 ]

It was decided to implement configurable SQL_ATTR_LOGIN_TIMEOUT (currently it is hard-coded 5 seconds) and do not implement SQL_ATTR_CONNECTION_TIMEOUT and SQL_ATTR_QUERY_TIMEOUT (not supported by PostgreSQL, MySQL ODBC drivers).

Comment by Andris Mednis [ 2013 Jul 30 ]

Available in svn://svn.zabbix.com/branches/dev/ZBX-6797 r37410. Fixed together with ZBX-6798. Only login timeout is implemented. Its value is equal to "Timeout" parameter in server configuration file.

Comment by Andris Zeila [ 2013 Jul 30 ]

(1) please review my changes in r37419
andris Reviewed and accepted.

Comment by Andris Zeila [ 2013 Jul 30 ]

ODBC timeout option (ZBX-6797) successfully tested.

Error message testing (ZBX-6798) in progress.

wiper error message testing done.

Comment by Andris Zeila [ 2013 Jul 31 ]

Successfully tested.

Comment by Andris Mednis [ 2013 Jul 31 ]

Fixed in versions pre-2.0.8 rev. 37450 and pre-2.1.2 rev.37500.

Comment by richlv [ 2013 Aug 01 ]

(2) this should be added both to whatsnew and upgrade notes

andris Added to Zabbix 2.0 documentation:
https://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew208
https://www.zabbix.com/documentation/2.0/manual/installation/upgrade_notes_208
https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/odbc_checks?&#important_notes
Added to Zabbix 2.2 documentation:
https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/odbc_checks?&#important_notes
RESOLVED

wiper reviewed and CLOSED

Generated at Fri Mar 29 12:37:07 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.