Bug #87335 | queryTimeout dose not work in connector/J loadbalance mode | ||
---|---|---|---|
Submitted: | 7 Aug 2017 6:08 | Modified: | 7 Aug 2017 9:02 |
Reporter: | Haixing Weng (OCA) | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.40 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | jdbc, loadbalance, queryTimeout |
[7 Aug 2017 6:08]
Haixing Weng
[7 Aug 2017 7:53]
Chiranjeevi Battula
Hello Haixing Weng, Thank you for the bug report and test case. I tried to reproduce the issue at my end using MySQL Connector / J 5.1.43 and MySQL 5.7.19 but not seeing any issues in connectTimeout and socketTimeout. Thanks, Chiranjeevi.
[7 Aug 2017 7:54]
Chiranjeevi Battula
mysql> show processlist; +----+------+-----------------+------+---------+------+------------+--------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+------+---------+------+------------+--------------------+ | 26 | root | localhost:63161 | test | Sleep | 331 | | NULL | | 27 | root | localhost:63162 | test | Sleep | 331 | | NULL | | 34 | root | localhost:63176 | NULL | Query | 0 | starting | show processlist | | 41 | root | localhost:63208 | test | Query | 1 | User sleep | SELECT SLEEP(3600) | +----+------+-----------------+------+---------+------+------------+--------------------+ 4 rows in set (0.00 sec) mysql> show processlist; +----+------+-----------------+------+---------+------+------------+--------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+------+---------+------+------------+--------------------+ | 26 | root | localhost:63161 | test | Sleep | 334 | | NULL | | 27 | root | localhost:63162 | test | Sleep | 334 | | NULL | | 34 | root | localhost:63176 | NULL | Query | 0 | starting | show processlist | | 41 | root | localhost:63208 | test | Query | 4 | User sleep | SELECT SLEEP(3600) | +----+------+-----------------+------+---------+------+------------+--------------------+ 4 rows in set (0.00 sec) mysql> show processlist; +----+------+-----------------+------+---------+------+------------+--------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+------+---------+------+------------+--------------------+ | 26 | root | localhost:63161 | test | Sleep | 339 | | NULL | | 27 | root | localhost:63162 | test | Sleep | 339 | | NULL | | 34 | root | localhost:63176 | NULL | Query | 0 | starting | show processlist | | 41 | root | localhost:63208 | test | Query | 9 | User sleep | SELECT SLEEP(3600) | +----+------+-----------------+------+---------+------+------------+--------------------+ 4 rows in set (0.00 sec) mysql> show processlist; +----+------+-----------------+------+---------+------+------------+--------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+------+---------+------+------------+--------------------+ | 26 | root | localhost:63161 | test | Sleep | 346 | | NULL | | 27 | root | localhost:63162 | test | Sleep | 346 | | NULL | | 34 | root | localhost:63176 | NULL | Query | 0 | starting | show processlist | | 41 | root | localhost:63208 | test | Query | 16 | User sleep | SELECT SLEEP(3600) | +----+------+-----------------+------+---------+------+------------+--------------------+ 4 rows in set (0.02 sec) mysql> show processlist; +----+------+-----------------+------+---------+------+------------+--------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+------+---------+------+------------+--------------------+ | 26 | root | localhost:63161 | test | Sleep | 352 | | NULL | | 27 | root | localhost:63162 | test | Sleep | 352 | | NULL | | 34 | root | localhost:63176 | NULL | Query | 0 | starting | show processlist | | 41 | root | localhost:63208 | test | Query | 22 | User sleep | SELECT SLEEP(3600) | +----+------+-----------------+------+---------+------+------------+--------------------+ 4 rows in set (0.00 sec) mysql> show processlist; +----+------+-----------------+------+---------+------+------------+--------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+------+---------+------+------------+--------------------+ | 26 | root | localhost:63161 | test | Sleep | 358 | | NULL | | 27 | root | localhost:63162 | test | Sleep | 358 | | NULL | | 34 | root | localhost:63176 | NULL | Query | 0 | starting | show processlist | | 41 | root | localhost:63208 | test | Query | 28 | User sleep | SELECT SLEEP(3600) | +----+------+-----------------+------+---------+------+------------+--------------------+ 4 rows in set (0.00 sec) mysql> show processlist; +----+------+-----------------+------+---------+------+----------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+------+---------+------+----------+------------------+ | 26 | root | localhost:63161 | test | Sleep | 362 | | NULL | | 27 | root | localhost:63162 | test | Sleep | 362 | | NULL | | 34 | root | localhost:63176 | NULL | Query | 0 | starting | show processlist | +----+------+-----------------+------+---------+------+----------+------------------+ 3 rows in set (0.01 sec) mysql>
[7 Aug 2017 9:02]
Haixing Weng
Hi Chiranjeevi Battula: I have confirmed that it's all normal in jdbc with a new version 5.1.43.I think I've made a mistake. Thank you