I was going to try and do this but it's being thrown in beaker when it the user first hits the site. Our app doesn't get heavy enough usage for me to move session storage over to something like memcached so I'm keeping it in the DB - I'll probably go with the "cronjob polling db every hour" solution.
On Monday, May 7, 2012 5:02:52 PM UTC-5, somewhatofftheway wrote: > > The hack that I used to get around this problem was to catch the exception > and try the connection a second time in the first function used in each > page (that loading the user in that case). This woke up the MySQL server > and did the trick. > > On 7 May 2012 19:46, Mike Orr <[email protected]> wrote: > >> > On one site I ended up polling the DB via a cron job. Nasty hack, but >> > it got the job done when none of the other options described worked. >> >> I used to have a lightly-used site that would sometimes go several >> days without a request, so I had cron restart the application every 8 >> hours. >> >> -- >> Mike Orr <[email protected]> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pylons-discuss" 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/pylons-discuss?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/3wB1icsGW1kJ. 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/pylons-discuss?hl=en.
