Re: ReplicationConnection and wait_timeout
Posted by: vladkravchenko
Date: June 19, 2007 10:53AM


I have the same issue.
Have you found any solution?

I have tried it with driver version 5.0.6.
I guess the driver sends some packets to master db even for readOnly connections, like:
191 Query USE `test`
191 Query SELECT @@session.tx_isolation
191 Query SET autocommit=1

In this case each read access creates additional load on the master and the whole system doesn't scale well.

If I add useLocalSessionState=true property to the connection string, readonly requests don't affect master, but I am getting problem with connections closed by MySQL after wait_timeout.

The solution could be to extend BasicDataSource and send validation query twice, once with connection.setReadonly(true) and one with false. Doing it in onBorrow would add to much load. But having a background thread sending validation query once a minute for all idle connections could help.

Any thoughts?


Options: ReplyQuote

Written By
Re: ReplicationConnection and wait_timeout
June 19, 2007 10:53AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.