Hi Eno,
Thanks for your response.
> Have you tried creating a persistent connection?
>
> Looking at the sfMySQLDatabase.class.php file I see that it calls
> mysql_pconnect() is the 'persistent' parameter is true:
>
> $persistent = $this->getParameter('persistent', false);
> $connect = ($persistent) ? 'mysql_pconnect' : 'mysql_connect';
Well, if possible I'd like to only load connections on demand, rather
than keeping one open all the time. But thanks for the info. Looking
at the connect() method in MySQLDatabase it looks like perhaps I could
get a raw connection by creating a new instance of MySQLDatabase and
passing that into my query functions? Just an idea. This doesn't seem
like the right way to do it, but perhaps there is a better way?
Best,
JLS
On Jan 30, 2009, at 2:17 PM, Eno wrote:
> On Jan 30, 3:52 pm, "John L. Singleton" <[email protected]>
> wrote:
>
>> The question is: how to I tell Symfony to reconnect to MySQL? Is the
>> solution to use something like Propel::getConnection() every time I
>> need it? Some other solution? As I mentioned, this script basically
>> runs 24/7, only waking up when it needs to do something. As such,
>> doing something like upping the MySQL timeout isn't really an option
>> for me.
>
> Have you tried creating a persistent connection?
>
> Looking at the sfMySQLDatabase.class.php file I see that it calls
> mysql_pconnect() is the 'persistent' parameter is true:
>
> $persistent = $this->getParameter('persistent', false);
> $connect = ($persistent) ? 'mysql_pconnect' : 'mysql_connect';
>
>
> --
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---