Problem with mysql and widnwos 2003 server

Questions and answers regarding general SQL and backend databases

Problem with mysql and widnwos 2003 server

Postby mimmogh » Wed Nov 19, 2014 11:18 am

Hi,

i have a solution installed on a wndows 2003 server with a mysql database

My solution use as databse the mysql installed on the server.

The problem is that, the mysql database seems go to sleep since launching the client you are unable to access the tables. It usually happens in the morning after a night of no work.
Now we have to stop and restart the server Servoy
I think the problem is the connector, but no way to solve it?

Thank's
mimmogh
 
Posts: 3
Joined: Tue Nov 10, 2009 4:23 pm
Location: Novi Ligure - italy

Re: Problem with mysql and widnwos 2003 server

Postby ROCLASI » Wed Nov 19, 2014 11:59 am

Hi,

MySQL has a habit of closing idle connections and does it in such a way that the application (in this case Servoy) is not aware of it. Causing all kinds of problems of course.
There are however a few settings in the connection settings that helps you reconnect to the server:

  • Add autoReconnect=true to the URL like so:
    jdbc:mysql://<serverURL>/<databaseName>?autoReconnect=true
  • Set the Connection validation type to query validation
  • Set the Validation query to select 1;

This won't get rid of any connection errors in the server log but at least it will reconnect to the database and the users won't notice.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 9 guests