Newly transcoded videos stuck in the state of "to move to an external storage"

Transcoded videos on my instance are typically transferred to object storage within a couple minutes.

However, since about a day ago, all transcoded videos seem to be stuck in the « to move » state.

I tried to force one of the videos to move by issuing a CLI command, but it simply said This video is already being moved to external storage/file system.

There doesn’t seem to be a corresponding error in the logs. It just never attempted to move them.

Hi,

Please enable debug logs and paste the output of move-object-to-storage jobs stuck until Peertube restarted · Issue #6686 · Chocobozzz/PeerTube · GitHub after a video upload

1 « J'aime »

Thanks for the reply Choco!

Unfortunately I can’t get you that data because I ran into a separate error. :frowning:

After I changed the log level from « info » to « debug », peertube failed to restart, with this error:


Oct 23 01:50:43 soviet.tankie.tube systemd[1]: peertube.service: Scheduled restart job, restart counter is at 2.
Oct 23 01:50:43 soviet.tankie.tube systemd[1]: Stopped peertube.service - PeerTube daemon.
Oct 23 01:50:43 soviet.tankie.tube systemd[1]: peertube.service: Consumed 3.498s CPU time.
Oct 23 01:50:43 soviet.tankie.tube systemd[1]: Started peertube.service - PeerTube daemon.
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]: [tankie.tube:443 uploadx] 2024-10-23 01:50:45.500 debug: DiskStorage config: {
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]:   directory: '/var/www/peertube/storage/tmp/resumable-uploads',
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]:   expiration: { maxAge: undefined, rolling: true },
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]:   maxMetadataSize: '10MB',
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]:   logger: [Function: Object],
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]:   userIdentifier: [Function: userIdentifier],
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]:   filename: [Function: filename]
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]: }
Oct 23 01:50:45 soviet.tankie.tube peertube[3579612]: [tankie.tube:443 uploadx] 2024-10-23 01:50:45.503 debug: Registered handlers: DELETE, GET, OPTIONS, PATCH, POST, PUT
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]: [tankie.tube:443] 2024-10-23 01:50:46.006 debug: Checking NodeJS version v18.20.4.
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]: [tankie.tube:443] 2024-10-23 01:50:46.007 info: Using following configuration file hierarchy: /var/www/peertube/config/default.yaml -> /var/www/peertube/config/production.yaml -> /var/www/peertube/config/local-production.json.
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]: [tankie.tube:443] 2024-10-23 01:50:46.179 error: Unable to connect to PostgreSQL database. {
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]:   "err": {
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]:     "stack": "Error: Parse error: Unexpected \": SELECT 1\" at line 1 column 20.\nThis likely happens because you're using the default \"sql\" dialect.\nIf possible, please select a more specific dialect (like sqlite, postgresql, etc).\n    at TokenizerEngine.createParseError (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:15859:12)\n    at TokenizerEngine.tokenize (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:15849:22)\n    at Tokenizer.tokenize (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:15969:65)\n    at LexerAdapter.tokenize (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:16806:37)\n    at LexerAdapter.reset (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:16341:24)\n    at Parser.feed (/var/www/peertube/versions/peertube-v6.3.2/node_modules/nearley/lib/nearley.js:281:15)\n    at Object.parse (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:16813:34)\n    at Formatter.parse (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:17522:49)\n    at Formatter.format (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:17517:22)\n    at formatDialect (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:17640:57)\n    at format (file:///var/www/peertube/versions/peertube-v6.3.2/node_modules/sql-formatter/dist/index.js:17630:10)\n    at Printf.template (file:///var/www/peertube/versions/peertube-v6.3.2/dist/core/helpers/logger.js:18:39)\n    at Printf.transform (/var/www/peertube/versions/peertube-v6.3.2/node_modules/logform/printf.js:11:26)\n    at Format.transform (/var/www/peertube/versions/peertube-v6.3.2/node_modules/logform/combine.js:20:24)\n    at Console._write (/var/www/peertube/versions/peertube-v6.3.2/node_modules/winston-transport/modern.js:91:33)\n    at doWrite (/var/www/peertube/versions/peertube-v6.3.2/node_modules/readable-stream/lib/_stream_writable.js:390:139)",
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]:     "message": "Parse error: Unexpected \": SELECT 1\" at line 1 column 20.\nThis likely happens because you're using the default \"sql\" dialect.\nIf possible, please select a more specific dialect (like sqlite, postgresql, etc)."
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]:   }
Oct 23 01:50:46 soviet.tankie.tube peertube[3579612]: }
Oct 23 01:50:46 soviet.tankie.tube systemd[1]: peertube.service: Main process exited, code=exited, status=255/EXCEPTION
Oct 23 01:50:46 soviet.tankie.tube systemd[1]: peertube.service: Failed with result 'exit-code'.
Oct 23 01:50:46 soviet.tankie.tube systemd[1]: peertube.service: Consumed 3.497s CPU time.
Oct 23 01:50:46 soviet.tankie.tube systemd[1]: peertube.service: Scheduled restart job, restart counter is at 3.

When I reverted the config and restarted peertube, the files began moving to object storage as expected.

Hi. When the issue happen, does a Peertube restart fix those videos? Or are they still stuck?

Yes, a restart fixed them.

probably same issue as this?