![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461962654.webp)
Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2634
| | | | | | info : Freeing memory of members
| | | | | | info : scheme=unix:///tmp/mysql.sock
| | | | | | >mysqlnd_error_list_pdtor
| | | | | | <mysqlnd_error_list_pdtor
| | | | | <mysqlnd_conn::free_contents
| | | | <mysqlnd_conn::connect
[...]
The trace log can also be used to verify correct behaviour of PECL/mysqlnd_ms itself, for example, to
check which server has been selected for query execution and why.
Example excerpt from the debug log (plugin decision):
[...]
>mysqlnd_ms::query
| info : query=DROP TABLE IF EXISTS test
| >_mysqlnd_plugin_get_plugin_connection_data
| | info : plugin_id=5
| <_mysqlnd_plugin_get_plugin_connection_data
| >mysqlnd_ms_pick_server_ex
| | info : conn_data=0x7fb6a7d3e5a0 *conn_data=0x7fb6a7d410d0
| | >mysqlnd_ms_select_servers_all
| | <mysqlnd_ms_select_servers_all
| | >mysqlnd_ms_choose_connection_rr
| | | >mysqlnd_ms_query_is_select
[...]
| | | <mysqlnd_ms_query_is_select
[...]
| | | info : Init the master context
| | | info : list(0x7fb6a7d3f598) has 1
| | | info : Using master connection
| | | >mysqlnd_ms_advanced_connect
| | | | >mysqlnd_conn::connect
| | | | | info : host=localhost user=root db=test port=3306 flags=131072 persistent=0 state=0
In this case the statement
DROP TABLE IF EXISTS test
has been executed. Note that the
statement string is shown in the log file. You may want to take measures to restrict access to the log for
security considerations.
The statement has been load balanced using round robin policy, as you can easily guess from
the functions name
>mysqlnd_ms_choose_connection_rr
. It has been sent to a master
server running on
host=localhost user=root db=test port=3306 flags=131072
persistent=0 state=0
.
20.7.6.6.8. Monitoring
Copyright 1997-2012 the PHP Documentation Group. [2230]
Plugin activity can be monitored using the mysqlnd trace log, mysqlnd statistics, mysqlnd_ms plugin
statistics and external PHP debugging tools. Use of the trace log should be limited to debugging. It is
recommended to use the plugins statistics for monitoring.
Writing a trace log is a slow operation. If using an external PHP debugging tool, please refer to the
vendors manual about its performance impact and the type of information collected. In many cases,
external debugging tools will provide call stacks. Often, a call stack or a trace log is more difficult to
interpret than the statistics provided by the plugin.
Plugin statistics tell how often which kind of cluster node has been used (slave or master), why the
node was used, if lazy connections have been used and if global transaction ID injection has been
performed. The monitoring information provided enables user to verify plugin decisions and to plan
their cluster resources based on usage pattern. The function
mysqlnd_ms_get_stats
is used to
access the statistics. Please, see the functions description for a list of available statistics.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...