Maps App stalls while scanning photos

In my Nextcloud I have thousands of photos stored in external NAS drive. The new Maps App got stucked while scanning my photos. But it is telling me for days that media scan is not completed and I should wait. Some pictures are shown on the map (exact number: 630) lots more not (2-3K).

My questions:

  1. Where can I trigger manual media scan or reset existing scans, forcing the app to rescan?

  2. Is this the same media scan the Gallery App also does?

I have actually tried the maps app as well and first I couldn’t see the my photos being scanned at all, so I tried to force a scan using occ maps:scan, which seemd to work until it got suddenly killed. Looking at the process list of my NC instance, I noted two cron jobs, which are running every 15 mins, where one of them is the usual NC cron.php.

I figured, that these jobs may have been interfering with each other, so I disabled the cron.php for the time being and re-ran the occ maps:scan, which has already scanned 6000+ photos, which the maps app is showing as well.

Thank you for your hint with OCC. Now I see what’s the Error: After several thousands files I am getting this message (* marked out)

In AbstractMySQLDriver.php line 53:
                                                                                                                                                                       
  An exception occurred while executing 'UPDATE `oc_file_locks` SET `lock` = `lock` + 1, `ttl` = ? WHERE `key` = ? AND `lock` >= 0' with params [1567960279, "files\/  
  ************************"]:                                                                                                                                  
                                                                                                                                                                       
  SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction                                                      
                                                                                                                                                                       

In PDOStatement.php line 143:
                                                                                                                   
  SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction  
                                                                                                                   

In PDOStatement.php line 141:
                                                                                                                   
  SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

after 5th attempt and with disabled Sync Clients the scan seems to run through all my photos. I can’t tell why but the file_locks error always occured when working with files. So there might be some sort of interfering.

Another wish or room for improvement: Any option for rescanning files without deleting the existing recordsets of already scanned files.

Redis should help to avoid these deadlocks. It happened to me without redis very often as well. Since redis no more issues.

The maps app is still in development. I believe some more improvements regarding the scanning process will come.

Unfortunately Redis already is enabled and in use. I wonder myself if filelocking.enabled => true is making a difference in /core/config.php when I set it to false…

Agree with you on this: This app neds a bit more love esp. during scanning process

Agreed, it needs attenton to the scanning of images. My experience was that it died by runnng out of memory. Attempting to restart started at the beginning. But I think there’s a problem with the way images are approached. Firstly it started by scanning all my wife’s patchwork photos which have no geographical significance. Before it died it found just 56 pictures of mine which it thought it could place. One was an image of an architecural skethc which was placed about a mile away from its location. About half a dozen maps which had map in the file name but which didn’t get the location (township names) recognised were placed at the intersection of the Greenwich meridien and the equator and the rest, images of Manor court rolls were reasonably placed at Wakefield although photographed in Leeds. So a lot of effort goes into scanning non geographical images. Secondly a user might not wish to have all the geographically relevant images displayed at the same time; they may represent different projects. I suggest the better way would be to let the user select folders with images to be scanned, list any images that can’t be automatically identified and let the user place them if they are relevant and then select the folder(s) to display on the map at any given time. e.g.my historic well pictures, part of a local history project, wouldn’t normally be shown at the same time as the historic postcards of the same area.