You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After a long media processing operation (e.g. processing an .mp4 file for ~ 10 minutes), when the process is done and photoview attempts to perform an INSERT with the result, it will throw this error:
photoview | [mysql] 2022/01/11 09:12:54 connection.go:173: bad connection photoview | 2022/01/11 09:12:54 ERROR: Failed to begin database transaction: failed to process photo (/photos/2017/04/30/gopro/GOPR0588.MP4): failed to insert video thumbnail image into database (GOPR0588.MP4): driver: bad connection
To Reproduce
Start a new scan with a long media processing operation, after several minutes, when the media processing is complete, photoview will attempt to perform an INSERT and will show the bad connection error.
Expected behavior
Connection shouldn't go bad or should be handled and restored.
Screenshots
Your environment:
Are you using Docker? Yes
Database: MariaDB 10.5.13
Browser: Chrome
Version: 2.3.9
Hardware: Raspberry Pi 3
OS: Raspbian ARM64
Additional context
I found a possible fix here, which has been cherry picked from other projects as well:
Not sure if it is applicable since I know very little about Go. I think it might be related to the speed of the media processing, on my Raspberry Pi there are several videos which takes a while to process and that might cause an unhandled timeout in the database connection (just trying to guess).
Thank you!
The text was updated successfully, but these errors were encountered:
I believe that the version of go-sql-driver/mysql used for the project contains that fix.
As they suggest in the PR you referenced, you can try to increase the wait_timeout of your database1.
I think that's the best option if possible, rather than making modifications to the codebase of Photoview.
I'll close for now, but please make a comment if you think I should reopen it.
Describe the bug
After a long media processing operation (e.g. processing an .mp4 file for ~ 10 minutes), when the process is done and photoview attempts to perform an INSERT with the result, it will throw this error:
photoview | [mysql] 2022/01/11 09:12:54 connection.go:173: bad connection
photoview | 2022/01/11 09:12:54 ERROR: Failed to begin database transaction: failed to process photo (/photos/2017/04/30/gopro/GOPR0588.MP4): failed to insert video thumbnail image into database (GOPR0588.MP4): driver: bad connection
To Reproduce
Start a new scan with a long media processing operation, after several minutes, when the media processing is complete, photoview will attempt to perform an INSERT and will show the bad connection error.
Expected behavior
Connection shouldn't go bad or should be handled and restored.
Screenshots
Your environment:
Additional context
I found a possible fix here, which has been cherry picked from other projects as well:
go-sql-driver/mysql#934
Not sure if it is applicable since I know very little about Go. I think it might be related to the speed of the media processing, on my Raspberry Pi there are several videos which takes a while to process and that might cause an unhandled timeout in the database connection (just trying to guess).
Thank you!
The text was updated successfully, but these errors were encountered: