Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql-monitor_read_only_timeout is implemented as seconds count but documented as ms #836

Closed
zahariash opened this issue Dec 12, 2016 · 3 comments
Assignees
Milestone

Comments

@zahariash
Copy link

mysql-monitor_read_only_timeout seems to be implemented as seconds count (0cfb351) but documented as number of miliseconds (https://github.com/sysown/proxysql/blob/master/doc/monitor.md).

Config:

mysql> SHOW VARIABLES LIKE 'mysql-monitor_read%';
+----------------------------------+-------+
| Variable_name | Value |
+----------------------------------+-------+
| mysql-monitor_read_only_interval | 1500 |
| mysql-monitor_read_only_timeout | 500 |
+----------------------------------+-------+
2 rows in set (0.00 sec)

Logged timeout:

2016-12-12 05:27:01 MySQL_Monitor.cpp:612:monitor_read_only_thread(): [ERROR] Timeout on read_only check for localhost:3306 after 505838ms. If the server is overload, increase mysql-monitor_read_only_timeout. Assuming read_only=1

It's 500 seconds, which makes it probably useless...

@renecannao
Copy link
Contributor

Thank you for the report.
What is incorrect is the error message.
The time unit returned from monotonic_time() is in microseconds, that is why mysql_thread___monitor_read_only_timeout (in milliseconds) is multiplied by 1000 in 0cfb351 .
I will fix the reported entry in the error log.

@zahariash
Copy link
Author

I see, thanks.

@renecannao renecannao self-assigned this Dec 12, 2016
@renecannao renecannao added this to the v1.3.1 milestone Dec 12, 2016
@renecannao
Copy link
Contributor

Reporting bug fixed in 1.3.1 (to be released today) and 1.4.0

minichate pushed a commit to minichate/proxysql that referenced this issue Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants