[gnome-db] GDA3 and forked application



Hi!

I started to talk with Vivien offlist but thought this place will be
better, as more heads to think is faster problem resolving :) Basically,
I am running PHP5 module with Apache2 forked (traditional) model and
GDA3 as DB abstraction layer. Problems starts to appear when child
processes die (or killed explicitly). I started to debug issue a bit and
now I found this:

1. I lost connection to MySQL provider when child dies.
2. gda_mysql_provider_close_connection is executed (101% sure), though
no idea where

	I used such wrap function:

	static void __gda_mysql_close(MYSQL *mysql, const gchar *msg)
	{
        	g_warning("CLOSING MYSQL CONNECTION BECAUSE : %s", msg);
        	mysql_close(mysql);
	}

	in gda_mysql_provider_close I replace mysql_close with:
	 __gda_mysql_close (mysql, "provider_close_conn");

	And it's invoked any time, child is killed.

3. 'conn-closed' signal is not emitted

Now I wonder, why connection is closed explicitly when child dies? I
opened it in parent and want to keep it opened as long as parent exists.

I used such callback to conn-closed:

static void _disconnect_cnc_callback(GdaConnection *cnc,
                GdaConnectionEvent *event, gpointer ud)
{
        g_warning("DISCONNECT CALLBACK!");

        return;
}

g_signal_connect(G_OBJECT(connection), "error",
                        G_CALLBACK(_disconnect_cnc_callback), (gpointer)
ptr);

I am not sure this signal is never emitted. I am sure a callback is
never executed.
I must say I feel blind here, as there's nothing I could take control over.

Last, but not least: GDA3 3.0.4 self compiled with default flags.

Piotras


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]