Friday, July 9, 2010

Keep live connection in WSO2 products with Mysql Server

When you are configuring WSO2 products with mysql there might be errors coming with normal configuration when you try to access the product console after a reasonable amount of time. So this is not an issue with the product neither Mysql server. You need to specifically configure to keep the connection live for a defined idle time. Please follow up the below steps to increase the timeout and make sure product will try to connect to the database once it timeouts.

1. Open the my.conf file in mysql installed machine( it's it's a linux machine it will be in /etc/my.conf and if it's a windows machine it will be there in your mysql installed directory) and add the following entries

wait_timeout=259200
interactive_timeout=259200
(this is the keep hte idle time out value for three days in seconds and if you want to keep more just increase the value)

2. Open the CARBON_HOME/repository/conf/registry.xml and CARBON_HOME/repository/conf/user-mgt.xml change url of the mysql database configuration like this

jdbc:mysql://localhost:3306/regdb2?autoReconnect=true

appened "?autoReconnect=true" element to the url.


No comments: