Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[ljcom] r9460: LJSUP-6721: Clean Caches cronjob fails

Committer: gariev
LJSUP-6721: Clean Caches cronjob fails
U   trunk/cgi-bin/LJ/API/Twitter.pm
Modified: trunk/cgi-bin/LJ/API/Twitter.pm
===================================================================
--- trunk/cgi-bin/LJ/API/Twitter.pm	2010-09-02 10:48:31 UTC (rev 9459)
+++ trunk/cgi-bin/LJ/API/Twitter.pm	2010-09-02 15:29:42 UTC (rev 9460)
@@ -309,6 +309,14 @@
     # we store them for a day
     my $time_stale = time - 86400;
 
+    ## 
+    ## This is a hack to work around the following error:
+    ## DBD::mysql::db do failed: MySQL server has gone away
+    ## The real problem is that LJ::get_db_writer() doesn't check
+    ## cached connection handle before returning it.
+    ##
+    LJ::start_request();   
+
     my $dbh = LJ::get_db_writer();
     $dbh->{'RaiseError'} = 1;
     $dbh->do(

Tags: gariev, ljcom, pm
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments