command: $sudo -u apache drush video-scheduler'
When a longer transcode is run (usually ogg), I get the following error:

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT vo.output_fid AS output_fid
FROM
{video_output} vo
WHERE (original_fid = :db_condition_placeholder_0) ; Array
(
[:db_condition_placeholder_0] => 984
)
in Transcoder->cleanConverted() (line 238 of sites/all/modules/video/includes/Transcoder.inc).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array
(
[:db_insert_placeholder_0] => 0
[:db_insert_placeholder_1] => php
[:db_insert_placeholder_2] => %type: !message in %function (line %line of %file).
[:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:232:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT vo.output_fid AS output_fid
FROM
{video_output} vo
WHERE (original_fid = :db_condition_placeholder_0) ; Array
(
[:db_condition_placeholder_0] => 984
)
";s:9:"%function";s:28:"Transcoder->cleanConverted()";s:5:"%file";s:83:"sites/all/modules/video/includes/Transcoder.inc";s:5:"%line";i:238;s:14:"severity_level";i:3;}
[:db_insert_placeholder_4] => 3
[:db_insert_placeholder_5] =>
[:db_insert_placeholder_6] => http://default/index.php
[:db_insert_placeholder_7] =>
[:db_insert_placeholder_8] => 127.0.0.1
[:db_insert_placeholder_9] => 1360619188
)
in dblog_watchdog() (line 154 of modules/dblog/dblog.module).


Drush command terminated abnormally due to an unrecoverable error.
CommentFileSizeAuthor
#5 server-has-gone-away-fix-1915602-5.patch769 byteszhgenti
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jorrit’s picture

Could you try to determine the value og the wait_timeout setting of MySQL?

selfsimilar’s picture

my.conf shows:
wait-timeout = 600

Still trying to determine if that's my actual timeout value during runtime.

selfsimilar’s picture

I upped interactive-timeout and wait-timeout to their default 28800 value, so we'll see if that helps.

However, it seems like it might not be a bad idea to decouple the start transcode code from the "oncomplete" code. Especially since transcode is often run via cron, the 'oncomplete' could just run on 'completed' but not 'finished' jobs.

Heihachi88’s picture

So upping wait_timeout to 28800 helped you?

zhgenti’s picture

Issue summary: View changes
FileSize
769 bytes

Hey guys,

Here is a patch to address the issue. It closes database connection before starting the conversion since it can take a lot of time. Then connection is automatically opened with next call to the database.

Hope it helps!

zhgenti’s picture

Status: Active » Needs review
heshanlk’s picture

Component: Video Transcoding » General
Status: Needs review » Fixed

  • heshanlk committed f7f2693 on 7.x-2.x authored by zhgenti
    Issue #1915602 by zhgenti: SQL Server has gone away uncaught exception
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.