{"action":"created","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/1600","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/1600/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/1600/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/1600/events","html_url":"https://github.com/sysown/proxysql/issues/1600","id":340044362,"node_id":"MDU6SXNzdWUzNDAwNDQzNjI=","number":1600,"title":"Broken connections","user":{"login":"mihaibrehar","id":17059128,"node_id":"MDQ6VXNlcjE3MDU5MTI4","avatar_url":"https://avatars2.githubusercontent.com/u/17059128?v=4","gravatar_id":"","url":"https://api.github.com/users/mihaibrehar","html_url":"https://github.com/mihaibrehar","followers_url":"https://api.github.com/users/mihaibrehar/followers","following_url":"https://api.github.com/users/mihaibrehar/following{/other_user}","gists_url":"https://api.github.com/users/mihaibrehar/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaibrehar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaibrehar/subscriptions","organizations_url":"https://api.github.com/users/mihaibrehar/orgs","repos_url":"https://api.github.com/users/mihaibrehar/repos","events_url":"https://api.github.com/users/mihaibrehar/events{/privacy}","received_events_url":"https://api.github.com/users/mihaibrehar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-10T23:47:43Z","updated_at":"2018-08-06T17:56:16Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI am using Proxysql 1.4.8 on Debian 8 with Percona 5.6.38.\r\n\r\nI have lots of messages like this:\r\n\r\n`2018-07-11 01:45:01 MySQL_Session.cpp:2816:handler(): [ERROR] Detected a broken connection during query on (1,127.0.0.1,3306) , FD (Conn:28 , MyDS:28) : 2013, Lost connection to MySQL server during query`\r\n\r\nBut also a few of these:\r\n\r\n`2018-07-11 01:23:34 MySQL_Thread.cpp:3080:process_data_on_data_stream(): [WARNING] Detected broken idle connection on 127.0.0.1:3306`\r\n\r\n`2018-07-11 02:00:02 MySQL_Session.cpp:959:handler_again___status_PINGING_SERVER(): [ERROR] Detected a broken connection during ping on (1,127.0.0.1,3306) , FD (Conn:30 , MyDS:30) : 2013, Lost connection to MySQL server during query`\r\n\r\nThe first error happens right on the first query (well, second, after set names). The query is a simple one: `SELECT *, something as name FROM table`. And the table is small. Most of the time the query runs fine so I am not sure how to continue the investigation. Maybe it's a query that runs before it? Or maybe it's something specific to Percona 5.6?\r\n\r\nI have a split read/write configuration, without monitoring (so I've got \"errors\" in the logs about that as well) \r\n\r\n127.0.0.1 is used as a read-only backend. \r\nSometimes the error happens also on the write backend and always it's a `begin` or `commit` query.\r\n\r\nI am trying to replicate whatever happens. Any idea besides this?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/sysown/proxysql/issues/comments/410795474","html_url":"https://github.com/sysown/proxysql/issues/1600#issuecomment-410795474","issue_url":"https://api.github.com/repos/sysown/proxysql/issues/1600","id":410795474,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDc5NTQ3NA==","user":{"login":"Reiner030","id":29528,"node_id":"MDQ6VXNlcjI5NTI4","avatar_url":"https://avatars2.githubusercontent.com/u/29528?v=4","gravatar_id":"","url":"https://api.github.com/users/Reiner030","html_url":"https://github.com/Reiner030","followers_url":"https://api.github.com/users/Reiner030/followers","following_url":"https://api.github.com/users/Reiner030/following{/other_user}","gists_url":"https://api.github.com/users/Reiner030/gists{/gist_id}","starred_url":"https://api.github.com/users/Reiner030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reiner030/subscriptions","organizations_url":"https://api.github.com/users/Reiner030/orgs","repos_url":"https://api.github.com/users/Reiner030/repos","events_url":"https://api.github.com/users/Reiner030/events{/privacy}","received_events_url":"https://api.github.com/users/Reiner030/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T17:56:16Z","updated_at":"2018-08-06T17:56:16Z","author_association":"NONE","body":"Hi, sorry for late answer but this problems happens only in production system and only when the system is under high load. But today we got another exception - this time not on Debian Stretch/9  but on Jessie/8 also running latest ProxySQL 1.4.9.\r\n\r\nWhile I saved above rules and additional system parameters I realized that just at the time when the disconnect happens ProxySQL requested more memory and seems to have problems with this task.\r\nSo perhaps this error would gone with your already applyed memory leak patch for 1.4.10 ?\r\n\r\n* [Full MySQL Stats](https://drive.google.com/file/d/1uDps6O9Lie76jQZsOtvE-mG2yC5DbP-0/view)\r\n* [MySQL Stats without queries, failures and connected sessions](https://drive.google.com/file/d/111fOy7FV3XHZsXiDdlOjlqtAl8l_Rbk2/view)\r\n* [MySQL System Stats](https://drive.google.com/file/d/11QEQiXG5yzM75lIl2F9SaOqwSqrJM-LE/view)\r\n\r\nAfter restarting ProxySQL the memory is / processes runs again fine:\r\n* [Full system stats](https://drive.google.com/file/d/1EJRv5xzUxdPdiP4sjfrJPxFf-gvhuIdb/view)\r\n* [System stats without mapping](https://drive.google.com/file/d/1qlTuEtCaHhomk5zF5_PhN0ZtwnTstXo7/view)\r\n* I saw a little late that there is also [Metadata memory increased](https://drive.google.com/file/d/1ZETnlqs_nODufz5dbNx0fbtVt0ebY_df/view)\r\n\r\nFirst system stats after disconnect (and all backend workers stopped);\r\n\r\n```\r\nroot@server ~ # ps uf 4268 16612\r\nUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\r\nroot      4268  0.0  0.0  36284  3784 ?        S    Aug03   0:00 proxysql -c /etc/proxysql.cnf -D /var/lib/proxysql\r\nroot     16612  118  0.0 914504 73616 ?        Sl   08:40  83:17  \\_ proxysql -c /etc/proxysql.cnf -D /var/lib/proxysql\r\n\r\nroot@server ~ # cat /proc/4268/limits\r\nLimit                     Soft Limit           Hard Limit           Units\r\nMax cpu time              unlimited            unlimited            seconds\r\nMax file size             unlimited            unlimited            bytes\r\nMax data size             unlimited            unlimited            bytes\r\nMax stack size            8388608              unlimited            bytes\r\nMax core file size        1099511627776        1099511627776        bytes\r\nMax resident set          unlimited            unlimited            bytes\r\nMax processes             515239               515239               processes\r\nMax open files            102400               102400               files\r\nMax locked memory         65536                65536                bytes\r\nMax address space         unlimited            unlimited            bytes\r\nMax file locks            unlimited            unlimited            locks\r\nMax pending signals       515239               515239               signals\r\nMax msgqueue size         819200               819200               bytes\r\nMax nice priority         0                    0\r\nMax realtime priority     0                    0\r\nMax realtime timeout      unlimited            unlimited            us\r\n\r\nroot@server ~ # cat /proc/16612/limits\r\nLimit                     Soft Limit           Hard Limit           Units\r\nMax cpu time              unlimited            unlimited            seconds\r\nMax file size             unlimited            unlimited            bytes\r\nMax data size             unlimited            unlimited            bytes\r\nMax stack size            8388608              unlimited            bytes\r\nMax core file size        1099511627776        1099511627776        bytes\r\nMax resident set          unlimited            unlimited            bytes\r\nMax processes             515239               515239               processes\r\nMax open files            102400               102400               files\r\nMax locked memory         65536                65536                bytes\r\nMax address space         unlimited            unlimited            bytes\r\nMax file locks            unlimited            unlimited            locks\r\nMax pending signals       515239               515239               signals\r\nMax msgqueue size         819200               819200               bytes\r\nMax nice priority         0                    0\r\nMax realtime priority     0                    0\r\nMax realtime timeout      unlimited            unlimited            us\r\n\r\n\r\n\r\ntop - 09:54:48 up 31 days,  6:58,  2 users,  load average: 0.45, 0.64, 3.56\r\nTasks: 354 total,   1 running, 353 sleeping,   0 stopped,   0 zombie\r\n%Cpu0  :  0.7 us,  2.7 sy,  7.1 ni, 88.8 id,  0.0 wa,  0.0 hi,  0.7 si,  0.0 st\r\n%Cpu1  :  2.0 us,  1.0 sy,  0.0 ni, 95.3 id,  0.0 wa,  0.0 hi,  1.7 si,  0.0 st\r\n%Cpu2  :  1.4 us,  1.0 sy,  0.3 ni, 96.6 id,  0.0 wa,  0.0 hi,  0.7 si,  0.0 st\r\n%Cpu3  :  1.4 us,  1.4 sy,  0.0 ni, 97.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu4  :  1.4 us,  3.8 sy, 11.6 ni, 83.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu5  :  1.7 us,  1.4 sy,  0.0 ni, 96.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu6  :  0.7 us,  2.1 sy,  0.7 ni, 95.8 id,  0.0 wa,  0.0 hi,  0.7 si,  0.0 st\r\n%Cpu7  :  0.3 us,  1.4 sy,  0.0 ni, 98.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu8  :  1.0 us,  2.7 sy,  4.5 ni, 91.4 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st\r\n%Cpu9  :  0.7 us,  1.0 sy,  0.3 ni, 97.6 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st\r\n%Cpu10 :  0.7 us,  2.1 sy,  5.2 ni, 92.1 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu11 :  1.0 us,  3.1 sy,  4.8 ni, 91.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\nKiB Mem:  13193021+total, 24070376 used, 10785984+free,  1656984 buffers\r\nKiB Swap: 16777212 total,        0 used, 16777212 free. 17387844 cached Mem\r\n\r\n  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND\r\n...\r\n16612 root      20   0  914504  68296   6364 S   0.3  0.1  83:17.42 proxysql\r\n...\r\n```\r\n\r\nand in batch mode I got these both usages multiple times::\r\n\r\n```\r\nroot@server ~ # top -b | grep proxysql\r\n  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND\r\n 4268 root      20   0   36284   3784   3008 S   0.0  0.0   0:00.00 proxysql\r\n16612 root      20   0  914504  68724   6364 S   0.0  0.1  83:17.80 proxysql\r\n\r\n16612 root      20   0  914504  68724   6364 S   0.3  0.1  83:17.81 proxysql\r\n 4268 root      20   0   36284   3784   3008 S   0.0  0.0   0:00.00 proxysql\r\n```\r\n\r\nHere sanitized output of requested queries:\r\n```\r\nProxySQL> SHOW MYSQL VARIABLES;\r\n+-----------------------------------------------------+-----------------------------------------------------+\r\n| Variable_name                                       | Value                                               |\r\n+-----------------------------------------------------+-----------------------------------------------------+\r\n| mysql-autocommit_false_is_transaction               | false                                               |\r\n| mysql-autocommit_false_not_reusable                 | false                                               |\r\n| mysql-client_found_rows                             | true                                                |\r\n| mysql-client_multi_statements                       | true                                                |\r\n| mysql-commands_stats                                | true                                                |\r\n| mysql-connect_retries_delay                         | 500                                                 |\r\n| mysql-connect_retries_on_failure                    | 30                                                  |\r\n| mysql-connect_timeout_server                        | 3000                                                |\r\n| mysql-connect_timeout_server_max                    | 60000                                               |\r\n| mysql-connection_delay_multiplex_ms                 | 0                                                   |\r\n| mysql-connection_max_age_ms                         | 3000                                                |\r\n| mysql-connpoll_reset_queue_length                   | 50                                                  |\r\n| mysql-default_charset                               | utf8                                                |\r\n| mysql-default_max_latency_ms                        | 1000                                                |\r\n| mysql-default_query_delay                           | 0                                                   |\r\n| mysql-default_query_timeout                         | 36000000                                            |\r\n| mysql-default_reconnect                             | true                                                |\r\n| mysql-default_schema                                | information_schema                                  |\r\n| mysql-default_sql_mode                              |                                                     |\r\n| mysql-default_time_zone                             | SYSTEM                                              |\r\n| mysql-enforce_autocommit_on_reads                   | false                                               |\r\n| mysql-eventslog_filename                            |                                                     |\r\n| mysql-eventslog_filesize                            | 104857600                                           |\r\n| mysql-forward_autocommit                            | false                                               |\r\n| mysql-free_connections_pct                          | 10                                                  |\r\n| mysql-have_compress                                 | true                                                |\r\n| mysql-hostgroup_manager_verbose                     | 1                                                   |\r\n| mysql-init_connect                                  |                                                     |\r\n| mysql-interfaces                                    | 127.0.0.1:6033;172.16.30.17:6033;/tmp/proxysql.sock |\r\n| mysql-long_query_time                               | 1000                                                |\r\n| mysql-max_allowed_packet                            | 268435456                                           |\r\n| mysql-max_connections                               | 4096                                                |\r\n| mysql-max_stmts_cache                               | 10000                                               |\r\n| mysql-max_stmts_per_connection                      | 20                                                  |\r\n| mysql-max_transaction_time                          | 14400000                                            |\r\n| mysql-mirror_max_concurrency                        | 16                                                  |\r\n| mysql-mirror_max_queue_length                       | 32000                                               |\r\n| mysql-monitor_connect_interval                      | 20000                                               |\r\n| mysql-monitor_connect_timeout                       | 6000                                                |\r\n| mysql-monitor_enabled                               | true                                                |\r\n| mysql-monitor_groupreplication_healthcheck_interval | 5000                                                |\r\n| mysql-monitor_groupreplication_healthcheck_timeout  | 800                                                 |\r\n| mysql-monitor_history                               | 600000                                              |\r\n| mysql-monitor_password                              | XXXXXXXXXXXXXXXX                                    |\r\n| mysql-monitor_ping_interval                         | 10000                                               |\r\n| mysql-monitor_ping_max_failures                     | 3                                                   |\r\n| mysql-monitor_ping_timeout                          | 6000                                                |\r\n| mysql-monitor_query_interval                        | 60000                                               |\r\n| mysql-monitor_query_timeout                         | 100                                                 |\r\n| mysql-monitor_read_only_interval                    | 1500                                                |\r\n| mysql-monitor_read_only_max_timeout_count           | 3                                                   |\r\n| mysql-monitor_read_only_timeout                     | 500                                                 |\r\n| mysql-monitor_replication_lag_interval              | 10000                                               |\r\n| mysql-monitor_replication_lag_timeout               | 1000                                                |\r\n| mysql-monitor_replication_lag_use_percona_heartbeat |                                                     |\r\n| mysql-monitor_slave_lag_when_null                   | 60                                                  |\r\n| mysql-monitor_username                              | proxysql_monitor                                    |\r\n| mysql-monitor_wait_timeout                          | true                                                |\r\n| mysql-monitor_writer_is_also_reader                 | true                                                |\r\n| mysql-multiplexing                                  | false                                               |\r\n| mysql-ping_interval_server_msec                     | 120000                                              |\r\n| mysql-ping_timeout_server                           | 500                                                 |\r\n| mysql-poll_timeout                                  | 2000                                                |\r\n| mysql-poll_timeout_on_failure                       | 100                                                 |\r\n| mysql-query_cache_size_MB                           | 256                                                 |\r\n| mysql-query_digests                                 | true                                                |\r\n| mysql-query_digests_lowercase                       | false                                               |\r\n| mysql-query_digests_max_digest_length               | 2048                                                |\r\n| mysql-query_digests_max_query_length                | 65000                                               |\r\n| mysql-query_processor_iterations                    | 0                                                   |\r\n| mysql-query_processor_regex                         | 1                                                   |\r\n| mysql-query_retries_on_failure                      | 1                                                   |\r\n| mysql-server_capabilities                           | 45578                                               |\r\n| mysql-server_version                                | 5.5.30                                              |\r\n| mysql-servers_stats                                 | true                                                |\r\n| mysql-session_idle_ms                               | 1000                                                |\r\n| mysql-session_idle_show_processlist                 | true                                                |\r\n| mysql-sessions_sort                                 | true                                                |\r\n| mysql-shun_on_failures                              | 5                                                   |\r\n| mysql-shun_recovery_time_sec                        | 10                                                  |\r\n| mysql-ssl_p2s_ca                                    |                                                     |\r\n| mysql-ssl_p2s_cert                                  |                                                     |\r\n| mysql-ssl_p2s_cipher                                |                                                     |\r\n| mysql-ssl_p2s_key                                   |                                                     |\r\n| mysql-stacksize                                     | 1048576                                             |\r\n| mysql-stats_time_backend_query                      | false                                               |\r\n| mysql-stats_time_query_processor                    | false                                               |\r\n| mysql-threads                                       | 12                                                  |\r\n| mysql-threshold_query_length                        | 524288                                              |\r\n| mysql-threshold_resultset_size                      | 4194304                                             |\r\n| mysql-throttle_connections_per_sec_to_hostgroup     | 1000000                                             |\r\n| mysql-throttle_max_bytes_per_second_to_client       | 2147483647                                          |\r\n| mysql-throttle_ratio_server_to_client               | 0                                                   |\r\n| mysql-verbose_query_error                           | true                                                |\r\n| mysql-wait_timeout                                  | 3600000                                             |\r\n+-----------------------------------------------------+-----------------------------------------------------+\r\n95 rows in set (0.00 sec)\r\n```\r\n\r\n```\r\nProxySQL> SELECT * FROM stats.stats_mysql_global ORDER BY Variable_Name;\r\n+------------------------------+----------------+\r\n| Variable_Name                | Variable_Value |\r\n+------------------------------+----------------+\r\n| Active_Transactions          | 0              |\r\n| Backend_query_time_nsec      | 0              |\r\n| Client_Connections_aborted   | 0              |\r\n| Client_Connections_connected | 0              |\r\n| Client_Connections_created   | 18669          |\r\n| Client_Connections_non_idle  | 0              |\r\n| Com_autocommit               | 0              |\r\n| Com_autocommit_filtered      | 0              |\r\n| Com_backend_change_user      | 0              |\r\n| Com_backend_init_db          | 218            |\r\n| Com_backend_set_names        | 0              |\r\n| Com_backend_stmt_close       | 0              |\r\n| Com_backend_stmt_execute     | 0              |\r\n| Com_backend_stmt_prepare     | 0              |\r\n| Com_commit                   | 133993         |\r\n| Com_commit_filtered          | 0              |\r\n| Com_frontend_init_db         | 0              |\r\n| Com_frontend_set_names       | 0              |\r\n| Com_frontend_stmt_close      | 0              |\r\n| Com_frontend_stmt_execute    | 0              |\r\n| Com_frontend_stmt_prepare    | 0              |\r\n| Com_frontend_use_db          | 0              |\r\n| Com_rollback                 | 5              |\r\n| Com_rollback_filtered        | 0              |\r\n| ConnPool_get_conn_failure    | 0              |\r\n| ConnPool_get_conn_immediate  | 0              |\r\n| ConnPool_get_conn_success    | 37301          |\r\n| ConnPool_memory_bytes        | 1152           |\r\n| Mirror_concurrency           | 0              |\r\n| Mirror_queue_length          | 0              |\r\n| MyHGM_myconnpoll_destroy     | 6              |\r\n| MyHGM_myconnpoll_get         | 37301          |\r\n| MyHGM_myconnpoll_get_ok      | 37301          |\r\n| MyHGM_myconnpoll_push        | 37880          |\r\n| MyHGM_myconnpoll_reset       | 37880          |\r\n| MySQL_Monitor_Workers        | 16             |\r\n| MySQL_Thread_Workers         | 12             |\r\n| ProxySQL_Uptime              | 3853           |\r\n| Queries_backends_bytes_recv  | 8085856442     |\r\n| Queries_backends_bytes_sent  | 6259086298     |\r\n| Queries_frontends_bytes_recv | 6364969234     |\r\n| Queries_frontends_bytes_sent | 30817365258    |\r\n| Query_Cache_Entries          | 0              |\r\n| Query_Cache_Memory_bytes     | 0              |\r\n| Query_Cache_Purged           | 0              |\r\n| Query_Cache_bytes_IN         | 0              |\r\n| Query_Cache_bytes_OUT        | 0              |\r\n| Query_Cache_count_GET        | 0              |\r\n| Query_Cache_count_GET_OK     | 0              |\r\n| Query_Cache_count_SET        | 0              |\r\n| Query_Processor_time_nsec    | 0              |\r\n| Questions                    | 20734107       |\r\n| SQLite3_memory_bytes         | 2761776        |\r\n| Server_Connections_aborted   | 0              |\r\n| Server_Connections_connected | 0              |\r\n| Server_Connections_created   | 26885          |\r\n| Server_Connections_delayed   | 0              |\r\n| Servers_table_version        | 1              |\r\n| Slow_queries                 | 2              |\r\n| Stmt_Cached                  | 0              |\r\n| Stmt_Client_Active_Total     | 0              |\r\n| Stmt_Client_Active_Unique    | 0              |\r\n| Stmt_Max_Stmt_id             | 1              |\r\n| Stmt_Server_Active_Total     | 0              |\r\n| Stmt_Server_Active_Unique    | 0              |\r\n| mysql_backend_buffers_bytes  | 0              |\r\n| mysql_frontend_buffers_bytes | 0              |\r\n| mysql_session_internal_bytes | 56352          |\r\n+------------------------------+----------------+\r\n68 rows in set (0.00 sec)\r\n\r\n```\r\n\r\nFor backend server is production-slave1 = staging-slave1 using internal DNS resolution because our frontend servers stays in AWS region and use production-slave1 = production-master and staging-slave1 = staging-master with same configuration setup.\r\n\r\nThe simple practical example rules fits very well for our non-AWS backend to minimize outgoing expensive AWS traffic with 0,09 $/GB (compared to 1,39 €/TB reverse from external ISP connected with IPSec tunnels) :\r\n\r\n```\r\nProxySQL> SELECT * FROM mysql_query_rules;\r\n+---------+--------+----------+------------------+--------+-------------+------------+------------+--------+--------------+------------------------+----------------------+--------------+---------+-----------------+-----------------------+-----------+-----------+---------+---------+-------+-------------------+----------------+------------------+-----------+--------+-------------+-----------+-----+-------+---------+\r\n| rule_id | active | username | schemaname       | flagIN | client_addr | proxy_addr | proxy_port | digest | match_digest | match_pattern          | negate_match_pattern | re_modifiers | flagOUT | replace_pattern | destination_hostgroup | cache_ttl | reconnect | timeout | retries | delay | next_query_flagIN | mirror_flagOUT | mirror_hostgroup | error_msg | OK_msg | sticky_conn | multiplex | log | apply | comment |\r\n+---------+--------+----------+------------------+--------+-------------+------------+------------+--------+--------------+------------------------+----------------------+--------------+---------+-----------------+-----------------------+-----------+-----------+---------+---------+-------+-------------------+----------------+------------------+-----------+--------+-------------+-----------+-----+-------+---------+\r\n| 40010   | 1      | NULL     | STORE_staging    | 0      | NULL        | NULL       | NULL       | NULL   | NULL         | ^SELECT .* FOR UPDATE$ | 0                    | CASELESS     | NULL    | NULL            | NULL                  | NULL      | NULL      | NULL    | NULL    | NULL  | NULL              | NULL           | NULL             | NULL      | NULL   | NULL        | NULL      | NULL | 1     | NULL    |\r\n| 40011   | 1      | NULL     | STORE_staging    | 0      | NULL        | NULL       | NULL       | NULL   | NULL         | ^SELECT                | 0                    | CASELESS     | NULL    | NULL            | 401                   | NULL      | NULL      | NULL    | NULL    | NULL  | NULL              | NULL           | NULL             | NULL      | NULL   | NULL        | NULL      | NULL | 1     | NULL    |\r\n...\r\n\r\n| 50010   | 1      | NULL     | STORE_production | 0      | NULL        | NULL       | NULL       | NULL   | NULL         | ^SELECT .* FOR UPDATE$ | 0                    | CASELESS     | NULL    | NULL            | NULL                  | NULL      | NULL      | NULL    | NULL    | NULL  | NULL              | NULL           | NULL             | NULL      | NULL   | NULL        | NULL      | NULL | 1     | NULL    |\r\n| 50011   | 1      | NULL     | STORE_production | 0      | NULL        | NULL       | NULL       | NULL   | NULL         | ^SELECT                | 0                    | CASELESS     | NULL    | NULL            | 501                   | NULL      | NULL      | NULL    | NULL    | NULL  | NULL              | NULL           | NULL             | NULL      | NULL   | NULL        | NULL      | NULL | 1     | NULL   \r\n\r\n...\r\n\r\n+---------+--------+----------+------------------+--------+-------------+------------+------------+--------+--------------+------------------------+----------------------+--------------+---------+-----------------+-----------------------+-----------+-----------+---------+---------+-------+-------------------+----------------+------------------+-----------+--------+-------------+-----------+-----+-------+---------+\r\n|-----+-------------------+----------------+------------------+-----------+--------+-------------+-----------+-----+-------+---------+\r\n44 rows in set (0.00 sec)\r\n```\r\n\r\n```\r\nProxySQL> SELECT * FROM monitor.mysql_server_ping_log LIMIT 30;\r\n+-------------------+------+------------------+----------------------+------------+\r\n| hostname          | port | time_start_us    | ping_success_time_us | ping_error |\r\n+-------------------+------+------------------+----------------------+------------+\r\n| db-slave2         | 3306 | 1533548095843314 | 256                  | NULL       |\r\n| production-slave1 | 3306 | 1533548095845459 | 268                  | NULL       |\r\n| staging-slave1    | 3306 | 1533548095847661 | 230                  | NULL       |\r\n| production-master | 3306 | 1533548095844387 | 6619                 | NULL       |\r\n| staging-master    | 3306 | 1533548095846585 | 6377                 | NULL       |\r\n| db-slave2         | 3306 | 1533548105843412 | 308                  | NULL       |\r\n| production-slave1 | 3306 | 1533548105845609 | 243                  | NULL       |\r\n| staging-slave1    | 3306 | 1533548105847842 | 224                  | NULL       |\r\n| production-master | 3306 | 1533548105844495 | 6709                 | NULL       |\r\n| staging-master    | 3306 | 1533548105846739 | 6249                 | NULL       |\r\n| db-slave2         | 3306 | 1533548115843544 | 271                  | NULL       |\r\n| production-slave1 | 3306 | 1533548115845730 | 275                  | NULL       |\r\n| staging-slave1    | 3306 | 1533548115847898 | 235                  | NULL       |\r\n| production-master | 3306 | 1533548115844619 | 6616                 | NULL       |\r\n| staging-master    | 3306 | 1533548115846802 | 6173                 | NULL       |\r\n| db-slave2         | 3306 | 1533548125843540 | 335                  | NULL       |\r\n| production-slave1 | 3306 | 1533548125845756 | 231                  | NULL       |\r\n| staging-slave1    | 3306 | 1533548125847934 | 202                  | NULL       |\r\n| production-master | 3306 | 1533548125844613 | 6549                 | NULL       |\r\n| staging-master    | 3306 | 1533548125846839 | 6144                 | NULL       |\r\n| db-slave2         | 3306 | 1533548135843763 | 295                  | NULL       |\r\n| production-slave1 | 3306 | 1533548135845908 | 243                  | NULL       |\r\n| staging-slave1    | 3306 | 1533548135848137 | 298                  | NULL       |\r\n| production-master | 3306 | 1533548135844860 | 6605                 | NULL       |\r\n| staging-master    | 3306 | 1533548135847033 | 6443                 | NULL       |\r\n| db-slave2         | 3306 | 1533548145843829 | 241                  | NULL       |\r\n| production-slave1 | 3306 | 1533548145846016 | 236                  | NULL       |\r\n| staging-slave1    | 3306 | 1533548145848172 | 185                  | NULL       |\r\n| production-master | 3306 | 1533548145844941 | 6603                 | NULL       |\r\n| staging-master    | 3306 | 1533548145847092 | 6323                 | NULL       |\r\n+-------------------+------+------------------+----------------------+------------+\r\n30 rows in set (0.01 sec) \r\n\r\nProxySQL> SELECT * FROM monitor.mysql_server_ping_log WHERE ping_error NOT NULL LIMIT 30;\r\nEmpty set (0.00 sec)\r\n\r\nProxySQL> SELECT * FROM monitor.mysql_server_ping_log WHERE ping_success_time_us > 10000 LIMIT 30;\r\nEmpty set (0.00 sec)\r\n```\r\n\r\n```\r\nProxySQL> SELECT * FROM mysql_servers;\r\n+--------------+-------------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+-----------------------------+\r\n| hostgroup_id | hostname          | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment                     |\r\n+--------------+-------------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+-----------------------------+\r\n| 500          | production-master | 3306 | ONLINE | 1      | 1           | 8192            | 0                   | 0       | 0              | production: master          |\r\n| 501          | production-master | 3306 | ONLINE | 1      | 1           | 8192            | 0                   | 0       | 0              | production: master-readonly |\r\n| 501          | db-slave2         | 3306 | ONLINE | 6666   | 1           | 8192            | 10                  | 0       | 0              | production: slave db-slave2 |\r\n| 501          | production-slave1 | 3306 | ONLINE | 9999   | 1           | 8192            | 10                  | 0       | 0              | production: slave           |\r\n| 400          | staging-master    | 3306 | ONLINE | 1      | 1           | 8192            | 0                   | 0       | 0              | staging: master             |\r\n| 401          | staging-master    | 3306 | ONLINE | 1      | 1           | 8192            | 0                   | 0       | 0              | staging: master-readonly    |\r\n| 401          | db-slave2         | 3306 | ONLINE | 6666   | 1           | 8192            | 10                  | 0       | 0              | production: slave db-slave2 |\r\n| 401          | staging-slave1    | 3306 | ONLINE | 9999   | 1           | 8192            | 10                  | 0       | 0              | staging: slave              |\r\n+--------------+-------------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+-----------------------------+\r\n8 rows in set (0.00 sec)\r\n```\r\n\r\n```\r\n ProxySQL> SELECT * FROM stats_mysql_connection_pool;\r\n+-----------+-------------------+----------+--------+----------+----------+--------+---------+----------+-----------------+-----------------+------------+\r\n| hostgroup | srv_host          | srv_port | status | ConnUsed | ConnFree | ConnOK | ConnERR | Queries  | Bytes_data_sent | Bytes_data_recv | Latency_us |\r\n+-----------+-------------------+----------+--------+----------+----------+--------+---------+----------+-----------------+-----------------+------------+\r\n| 500       | production-master | 3306     | ONLINE | 0        | 0        | 11302  | 0       | 468934   | 57773127        | 17465283        | 6595       |\r\n| 501       | production-master | 3306     | ONLINE | 0        | 0        | 0      | 0       | 0        | 0               | 0               | 6595       |\r\n| 501       | db-slave2         | 3306     | ONLINE | 0        | 0        | 4516   | 0       | 8201812  | 2463800721      | 3015515239      | 293        |\r\n| 501       | production-slave1 | 3306     | ONLINE | 0        | 0        | 6895   | 0       | 11419598 | 3463047888      | 4459012970      | 232        |\r\n| 400       | staging-master    | 3306     | ONLINE | 52       | 1        | 2137   | 0       | 26669    | 4085447         | 385353          | 6248       |\r\n| 401       | staging-master    | 3306     | ONLINE | 0        | 0        | 0      | 0       | 0        | 0               | 0               | 6248       |\r\n| 401       | db-slave2         | 3306     | ONLINE | 17       | 3        | 813    | 0       | 233764   | 103510265       | 216100481       | 293        |\r\n| 401       | staging-slave1    | 3306     | ONLINE | 33       | 3        | 1331   | 0       | 393772   | 171005108       | 387715168       | 236        |\r\n+-----------+-------------------+----------+--------+----------+----------+--------+---------+----------+-----------------+-----------------+------------+\r\n8 rows in set (0.00 sec)\r\n\r\nProxySQL> SELECT * FROM stats_mysql_query_digest WHERE digest_text LIKE '%timeout%';\r\nEmpty set (0.03 sec)\r\n```\r\n"}}
{"actor":{"display_login":"Reiner030"}}