Roger Haase a écrit : > Hi, > > I am testing a new server with Fedora Core 6 and Middlekit-Webware 9.2 > and MySQL 5.0. When the new server is idle for 5 (or more) hours I get > abends with OperationalError: (2006, 'MySQL server has gone away'). > Restarting the webkit AppServer eliminates the immediate problem. > > I have not seen this problem on a lightly loaded server with Fedora > Core 4, MySQL 4.1, and Webware 9.1. The Webkit AppServer is restarted > by cron daily in both cases. In both cases the result of a call to > Middlekit MySQLObjectStore is saved in the Sitepage module at load time > for use by all servlets. > > Where should I be setting a timeout parameter for the Middlekit-MySql > connection? Is 24 hours an unreasonable time limit? > > Roger > This is a well known problem that they have introduced in mysql5. The best solution I found is to patch mysqldb to activate the auto-reconnect option of the mysql C API.
A mysqldb patch can be found here: http://sourceforge.net/tracker/index.php?func=detail&aid=1483074&group_id=22307&atid=374934 It also applies on mysqldb 1.2.2 If you want the option to be enabled by default, you can fix the patch easily yourself. Works great, even if you restart mysql. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss