TeleFlow Forums
http://teleflow.org/phpbb/

Problem connecting with database
http://teleflow.org/phpbb/viewtopic.php?f=2&t=471
Page 1 of 1

Author:  Santosh [ Fri Sep 21, 2007 6:20 am ]
Post subject:  Problem connecting with database

We are testing our teleflow server and sometime we get following error.

Error code -1 returned from ODBC driver
2007/09/19 10:03:57.375: SQL Error State: HYT00
Native Error Code: 7D6
ODBC Error: [MySQL][ODBC 3.51 Driver][mysqld-5.0.27-community-nt]MySQL server has gone away

The problem disappears when we call again. However this is happening too often to ignore (almost once in every 8 to 10 calls).

Your help in this regard will be greatly appreciated.

Santosh

Author:  Chris [ Fri Sep 21, 2007 4:54 pm ]
Post subject: 

Strictly speaking, this is a MySQL error, but I can make some suggestions.

First off, if you google "MySQL server has gone away", you will get a link to MySQL resources on this error. They have plenty of information about the error.

The first thing I would recommend doing in TeleFlow is making it so that your application disconnects from the database just before returning to Wait for Call, and then does a DB Connect just after answering a call to get a new connection for each call.

MySQL does have timeouts for connections, so if you connect only when your application starts, this may be what is happening.

If you are using dbretry to retry queries, another thing you could do is have DBRetry disconnect and then reconnect to the database prior to retrying your query. (It might be wise to only try this once, such as when the db retry counter is at its maximum)

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/