Announcement

#1 2024-01-01 20:41:34

rgischig
Member
Switzerland
2019-10-15
10

Directory-Sync fails with SQL error

Hi Team,

I have a huge Piwigo setup with about 300k images, divided up yearly folders to sync from the large drive. I have now installed a new NAS, which I mount into the sync directory from, so I can migrate my installation to a new less power hungry server in fututre...

Now if I sync the directory I get this error shown in the browserè


Warning:  [mysql error 1264] Out of range value for column 'id' at row 1

INSERT  INTO `piwigo_categories`
  (`id`,`dir`,`name`,`site_id`,`id_uppercat`,`uppercats`,`commentable`,`visible`,`status`,`rank`,`global_rank`)
  VALUES('65536','Z8I3134.NEF','Z8I3134.NEF','34','64962','26519,43277,55669,62290,64219,64222,64961,64962,65536','true','true','public','574','2427.11.1.1.3.2.2.1.574')
  , ('65537','Z8I3135.NEF','Z8I3135.NEF','34','64962','26519,43277,55669,62290,64219,64222,64961,64962,65537','true','true','public','575','2427.11.1.1.3.2.2.1.575')
  , ('65538','Z8I3136.NEF','Z8I3136.NEF','34','64962','26519,43277,55669,62290,64219,64222,64961,64962,65538','true','true','public','576','2427.11.1.1.3.2.2.1.576')
  , ('65539','Z8I3137.NEF','Z8I3137.NEF','34','64962','26519,43277,55669,62290,64219,64222,64961,64962,65539','true','true','public','577','2427.11.1.1.3.2.2.1.577')
  , ('65540','Z8I3138.NEF','Z8I3138.NEF','34','64962','26519,43277,55669,62290,64219,64222,64961,64962,65540','true','true','public','578','2427.11 in /vol/3/fastsource/www/www.gischig.com/htdocs-secure/gallery/include/dblayer/functions_mysqli.inc.php on line 847



Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
    AND status = 'private'' at line 3

SELECT id
  FROM piwigo_categories
  WHERE id IN ()
    AND status = 'private'
; in /vol/3/fastsource/www/www.gischig.com/htdocs-secure/gallery/include/dblayer/functions_mysqli.inc.php on line 847


Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /vol/3/fastsource/www/www.gischig.com/htdocs-secure/gallery/include/dblayer/functions_mysqli.inc.php:908 Stack trace: #0 /vol/3/fastsource/www/www.gischig.com/htdocs-secure/gallery/admin/include/functions.php(2929): query2array() #1 /vol/3/fastsource/www/www.gischig.com/htdocs-secure/gallery/admin/site_update.php(419): add_permission_on_category() #2 /vol/3/fastsource/www/www.gischig.com/htdocs-secure/gallery/admin.php(346): include('/vol/3/fastsour...') #3 {main} thrown in /vol/3/fastsource/www/www.gischig.com/htdocs-secure/gallery/include/dblayer/functions_mysqli.inc.php on line 908



Setup:
Piwigo 14.1.0 Check for upgrade
Installed on 22 May 2019, 4 years 7 months 1 week 3 days ago
Operating system: Linux
PHP: 7.4.3-4ubuntu2.19 (Show info) [2024-01-01 20:40:04]
MySQL: 8.0.35-0ubuntu0.20.04.1 [2024-01-01 20:40:04]
Graphics Library: ImageMagick 6.9.10-23
Cache size 88677.01 Mo   calculated 3 days ago Refresh

Activated plugin
Admin Tools
gdThumb
Language Switch
SmartAlbums
Take A Tour of Your Piwigo

Offline

 

#2 2024-01-01 20:44:45

rgischig
Member
Switzerland
2019-10-15
10

Re: Directory-Sync fails with SQL error

Let me add a few more things..

- Since I've switch the directory to the NAS, the new added folders do no show up after a sync
--> will do some more tests here

Sync settings:
synchronize files structure with database

X  directories + files

synchronize database photos with files metadata
X Synchronize metadata (filesize, width, height, date_creation, latitude, longitude)

No Simulation

The directly has about 8'000 images

Offline

 

#3 2024-01-01 21:25:24

rgischig
Member
Switzerland
2019-10-15
10

Re: Directory-Sync fails with SQL error

I've just added a new directory (year 2024) with a bunch of directories underneath..
nevertheless the sync fails to import new images, guess due to a overrun of the ID in SQL!

Looks identical to https://piwigo.org/forum/viewtopic.php?id=30764

not sure if it's due to the number of directories which could be around (many are empty, or do not hold any presentable data, such as RAW files). As I have a template directory structure for each event... and I don't know where I could even apply a regex on import, as I could filter out most directories. And re-import all again, is no joy..

roman

Last edited by rgischig (2024-01-01 22:23:19)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact