When using "Convert video on save"
The following error occurs and no video content can be created.
I'm not sure if this is caused by the latest version of Video module or latest version of Drupal. I know it worked before.
PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: UPDATE {video_queue} SET entity_type=:db_update_placeholder_0, entity_id=:db_update_placeholder_1, status=:db_update_placeholder_2, dimensions=:db_update_placeholder_3, duration=:db_update_placeholder_4, started=:db_update_placeholder_5, completed=:db_update_placeholder_6, statusupdated=:db_update_placeholder_7, data=:db_update_placeholder_8 WHERE (fid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => node [:db_update_placeholder_1] => 36382 [:db_update_placeholder_2] => 5 [:db_update_placeholder_3] => 640x360 [:db_update_placeholder_4] => 0 [:db_update_placeholder_5] => 1499183238 [:db_update_placeholder_6] => 0 [:db_update_placeholder_7] => 1499183238 [:db_update_placeholder_8] => a:3:{s:10:"field_name";s:11:"field_video";s:8:"langcode";s:3:"und";s:5:"delta";i:0;} [:db_condition_placeholder_0] => 63952 ) in drupal_write_record() (Zeile 7383 von /xxx/includes/common.inc).
Using cron to convert the videos works so far (using zencoder for conversion)
Comment | File | Size | Author |
---|---|---|---|
#10 | video-general_error_1205_db_lock-2892164-10.patch | 1.5 KB | jeni_dc |
Comments
Comment #2
voughndutch CreditAttribution: voughndutch commentedI confirm I am having this issue as well
Comment #3
hermes_costell CreditAttribution: hermes_costell as a volunteer commentedI have narrowed the issue down to the db_close(array('target' => 'default')); statement in includes/Transcoder.inc on line 198. When this is commented out the transcoding completes and everything seems fine.
With the db_close() statement left in, it results in a locked out situation in the database (in my particular setup, anyways). The query thread calling the db_close() appears to still have a lock of some kind on the tables which the following queries need to access, causing mysql to time out and then ROLLBACK the queries which would have saved the node.
This took quite a bit of looking at the mysql query log and cross-referencing with
which was a nice learning experience :).
I'm going to try the transcoding of a Very Large Video File to see what happens.
Comment #4
hermes_costell CreditAttribution: hermes_costell as a volunteer commentedIn a testing environment I'm working with a >100MB video file and it's transcoding successfully. There are of course a zillion caveats (what processors, etc) but at least I'm seeing a rather long transaction finishing successfully with that db_close(array('target' => 'default')); line commented out, whose stated purpose was to fix issues which arose due to long transcoding jobs.
Note: using the FFMpeg transcoder, in a local Windoze environment, testing out the "transcode on save" functionality. Transcoding via cron and Drush had always worked in my case.
Comment #5
mrydzik@commoditywx.com CreditAttribution: mrydzik@commoditywx.com commentedWe've also encountered this issue. #3 fixed the issue for our use case. We use the external Zencoder API.
Comment #6
bredlen CreditAttribution: bredlen commentedI can also confirm this issue, with #3 fixing it using Zencoder API
Comment #7
arosboro CreditAttribution: arosboro at DropForge Labs commentedThis fixes the error using the Elastic Transcoder api as well. So any remote transcoding job will work when commenting this line.
Comment #8
jyraya CreditAttribution: jyraya at European Commission and European Union Institutions, Agencies and Bodies commentedI also encountered this issue locally and commenting out the line as mentioned in #3, fixed the issue.
Someone knows in which conditions the db_close() line becomes necessary?
Comment #9
trickyricky26 CreditAttribution: trickyricky26 commentedSo many thanks!!! Commenting the line out saved my sanity.
Comment #10
jeni_dc CreditAttribution: jeni_dc commentedI'm still seeing this happening in 7.x-2.14 using the Zencoder transcoder and removing that line does fix it. I'm not sure if that'll break anything else, but I wanted to get a fix in for this so here's a patch to do so.
From the comments this isn't a problem with the FFmpeg transcoder, but is with other encoders like Zencoder and Elastic Transcoder. So instead of removing that line completely the patch will only run the db_close() if the FFmpeg transcoder is used.
Patch is against 7.x-2.x-dev from 13 Mar 2019.
Comment #11
poker10 CreditAttribution: poker10 at ActivIT s.r.o. commentedAdding related issue: #1915602: SQL Server has gone away uncaught exception . The
db_close()
call was added in that issue. So the options are either to rollback that change, or do a change as proposed by patch #10. I am curious if anyone else can confirm that the problem is only with external transcoders and thedb_close()
can still be used forFFmpeg
? Or does anyone experienced the bug described in the IS on FFmpeg transcoder?