SUMMARY After DK runs for some period of time (12hr or more), the previews for some images show up like normal, but some are the generic icon for "image" in windows. Then, clicking on ANY of the thumbnails will produce an error message on the main image screen: [Failed to load image]. I have digiKam running on my Windows 10/11 setup using a remote MySQL server for the core, faces and similarities db, and all the images and video are on an SMB share mounted as "P:" If I restart DK, everything works fine for the next 12hr or so. Then it repeats. STEPS TO REPRODUCE 1. Let the PC run for a long time - 12hrs plus 2. Open an album, then click on a thumbnail image OBSERVED RESULT The main image viewer panel opens, but no image is displayed, and it is a blank white screen There is only a note in the upper right side of the main viewer: [Failed to load image] EXPECTED RESULT Should open the larger image that is being previewed by the thumbnail and/or all the thumbnails should show the image's small scale version of the image and not the generic (universal) icon for "image". SOFTWARE/OS VERSIONS Windows: Win11 (24H2 OS Build 26100.3775) and Win10 (22H2 OS Build 19045.5753) ADDITIONAL INFORMATION The NAS is a WD PR4100 with two 1Gbps Eth using channel-bonding, and there have been no alerts from the NAS or the switch to indicate a port issue. All the PC have either 1Gbps or 5Gbps Eth ports. The backend is MikroTik switches (mix of 1Gbps to 10Gbps) The MariaDB is a docker image (11.7.2-MariaDB-ubu2404) running on Rocky 9.5 on a Mac Mini (late 2014 i7 / 16GB / 1Gbps) with the core, faces and similarities DBs setup and loaded with data. NOTE: It's acting like the network connection was lost on the PC or the NAS / MariaDB server went offline. I would expect if this was the case, rather than having to restart DK, it would reconnect and carry on after such a network issue. I could be wrong, but I don't think this is a network issue. One of the PC using DK is hosting a qBitTorrent client that is using the same NAS, but a different shared drive. The qBt client never gets an error message about missing files (that would be normal for a flaky network connection or the NAS going offline). However, it is not using the MariaDB server for anything other than digiKam.
MySQL servers have an interactive timeout and a wait timeout. The default value is 28800 seconds, which is 8 hours, after which the database connection is closed. So digiKam might need to use a timer to trigger a dummy query to the database server every hour. Maik
If this is the case, and restarting digiKam is enough to instantly wake up the MariaDB, couldn't the better solution be to add something to the code that will overcome a comatose MySQL server (besides kicking it once an hour) or network interruptions? I'll do some research on the MariaDB to see if there is an interactive timeout and/or a wait timeout and if they are adjustable. I've also had this happen when doing digiKam operations that take days to complete (Auto-tag Scan is the latest). I can see activity on the phpMyAdmin "Status", btop shows system activity on the server. But at some point, the [Failed to load image] is displayed and not an image when I select it..
Update: I checked the descriptions for interactive timeout and a wait timeout. They are related to individual transactions, not the database as a whole. "MariaDB has always had the wait_timeout and interactive_timeout settings, which close connections after a certain period of inactivity." https://mariadb.com/kb/en/transaction-timeouts/ If a new transaction is attempted by the client, it should connect with no problems. Also, today I had this issue crop up in real time - as I was using digiKam I was looking at an album in a collection and was double-clicking on a preview to open it in the expanded view and everything was working fine. After scrolling through some previews and opening and closing them, I picked one to be the Album Thumbnail. The next time I tried to open a preview image to the expanded view, the <Fail to load image> error showed up. From that point on, the only "fix" was to restart digiKam. And it starts working again. I'm also running btop on the MariaDB server and watching activity. Everything looks normal until it isn't. At that point, btop shows no more incoming connections from the client I am using. After I restart the digKam app on the PC, I see normal activity on the MariaDB server.
*** Bug 503892 has been marked as a duplicate of this bug. ***
*** Bug 504250 has been marked as a duplicate of this bug. ***
Just a note to all you guys tracking and fixing digiKam bugs (with thanks for your great work!): The "weird" behavior persists in the current version 8.7.0. After digiKam runs for a longer time (> 12h), the tag list is empty regardless of which image I select. Additionally, there are erratic side effects to other programs (menus that vanish, etc.). When re-starting, everything is back to normal for digiKam (but not for other programs that suffered side effects). Behaviour occured on two different machines (both with Windows 11, MariaDB 11.6.2) and fairly large image collections (> 400 k images, 20.000 tags) and therefore seems not to be related to hardware or third-party software issues. Remark: I reported this bug on 2025-05-17 as #504250 which has been marked as a duplicate of the bug reported in this thread.