[更新]可能是我使用(或誤用)的seamless_database_pool gem。如何判斷讀取是否被重定向到Rails3上的MySQL從服務器
我剛剛使用seamless_database_pool在Rails3上設置了主/從設置。這是否意味着讀取肯定不會被重定向到從機?
如何在MySQL級別檢查此項? 我希望show processlist
會這樣做,但我沒有看到任何進程。
[更新]
運行在主顯示器中的查詢正在運行show processlist
,所以我想的讀取不被傳遞給從機。
的bin_log文件只是具有以下(9及X加):
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @[email protected]@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; \# at 4 \#xxxxxxx 99:99:99 server id 2 end_log_pos 106 Start: binlog v 4, server v 5.1.52-log created xxxx 99:99:99 at startup ROLLBACK/*!*/; BINLOG ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxXXXXXXXXXXXXXXXXXXXXXXxxxxxxxxxxxxxxx '/*!*/; \# at 106 \#xxxx 99:99:99 server id 2 end_log_pos 125 Stop DELIMITER ; \# End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET [email protected]_COMPLETION_TYPE*/;
感謝
SHOW SLAVE STATUS在從機上顯示的是什麼? (請參閱:http://dev.mysql.com/doc/refman/5.0/en/replication-administration-status.html) – LSerni
SHOW SLAVE STATUS是最新的,主從通信正在工作。經過一番挖掘,我意識到我需要對[seamless_database_pool](https://github.com/bdurand/seamless_database_pool)的配置進行更改,並且一切都很好。感謝您的幫助,Isemi。 – bgajdero