I'm just guessing, since I haven't seen your code, but you're probably 
making a $dbh when you start the app..? That is not a good idea imo.

I suggest making a fresh $dbh on each request. The reason is that you won't 
get weird transaction errors and you make sure it is always fresh.

I also suggest using https://metacpan.org/pod/DBIx::Connector if you still 
have issues with connections.


On Wednesday, August 6, 2014 3:54:20 PM UTC+2, Александр Грошев wrote:
>
> Try add to connection options {mysql_auto_reconnect => 1 }
>
>
> 2014-08-06 17:09 GMT+04:00 Manu Agarwal <[email protected]>:
>
>> When running the hypnotoad server and there is no activity for around 12 
>> hours, the mysql server disconnects with the error,
>>
>> DBD::mysql::st execute failed: MySQL server has gone away at <perl module 
>> using mysql>
>>
>> I didnt face this problem when running the morbo server.
>>
>> Anything that I have to take care or any configuration which I may be 
>> missing?
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mojolicious" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/mojolicious.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> С уважением, Александр Грошев. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to