Daniel, el hacer ping cada x tiempo funciona para evitar que mysql corte la conexion, pero cuando por problemas de internet sucede un corte por peque帽os lapsos de tiempos?
has probado situaciones donde conexiones por internet, tu simulas cortes de internet? (desconectas el cable de red y lo reconectas para simular la desconexion)
tdolphin no se reconecta.
segun info leida a partir de determinada version (5.0.3) mysql ha deshabilitado la re conexiones autom谩ticas.
http://linux.overshoot.tv/wiki/mysql_server_has_gone_away
mira si esta modificacion ayuda
HB_FUNC( MYSQLCONNECT ) // -> MYSQL*
{
聽 聽MYSQL * mysql;
聽 聽unsigned int port 聽= ISNUM( 4 ) ? ( unsigned int ) hb_parni( 4 ) : 聽MYSQL_PORT;
聽 聽unsigned int flags = ISNUM( 5 ) ? ( unsigned int ) hb_parni( 5 ) : 聽0;
聽 聽PHB_ITEM pcbDecrypt = hb_param( 7, HB_IT_BLOCK ); 聽
聽 聽HB_BOOL bReconnect = TRUE; /*NUEVO*/
聽 聽
聽 聽mysql = mysql_init( NULL );
聽 聽
聽 聽if ( ( mysql != NULL ) )
聽 聽{
聽 聽 聽 mysql_options( mysql, ( enum mysql_option ) MYSQL_OPT_RECONNECT, &bReconnect ); /*NUEVO*/
聽 聽 聽
聽 聽 聽 mysql_real_connect( mysql,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 hb_itemGetC( hb_vmEvalBlockV( pcbDecrypt, 1, hb_param( 1, HB_IT_ANY ) ) ),
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 hb_itemGetC( hb_vmEvalBlockV( pcbDecrypt, 1, hb_param( 2, HB_IT_ANY ) ) ),
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 hb_itemGetC( hb_vmEvalBlockV( pcbDecrypt, 1, hb_param( 3, HB_IT_ANY ) ) ),
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 hb_itemGetC( hb_vmEvalBlockV( pcbDecrypt, 1, hb_param( 6, HB_IT_ANY ) ) ),
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 port, NULL, flags );
聽 聽 聽 hb_MYSQL_ret( mysql );
聽 聽}
聽 聽else
聽 聽{
聽 聽 聽hb_retptr( NULL );
聽 聽}
}