Announcement

#1 2009-03-03 19:12:56

thomas810
Member
2006-06-27
16

Sync Error

Just upgraded to new current version... when I try to sync... I get the following error message... unsure how to fix it... I ran sync twice and both times produces a terminal page with this error message:

Warning:  [mysql error 2013] Lost connection to MySQL server during query

SELECT id, path
  FROM phpwebgallery_images
  WHERE storage_category_id IN (2, 3, 4, 5, 6, 7, 8, 26, 32, 37, 38, 39, 40, 41, 42, 43, 44, 1021, 74, 75, 76,
77, 78, 79, 80, 81, 82, 997, 996, 96, 97, 98, 99, 100, 101, 102, 103, 994, 993,
117, 118, 119, 120, 121, 122, 123, 124, 125, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 146, 147, 148, 149, 150, 151, 152, 153, 154, 156, 157, 158,
167, 168, 169, 1004, 181, 182, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195,
196, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
222, 223, 224, 225, 226, 227, 228, 236, 237, 238, 239, 240, 241, 242, 243, 244,
1014, 1011, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
268, 269, 277, 278, 1025, 285, 286, 287, 288, 298, 307, 308, 309, 310, 311, 312,
321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
337, 338, 339, 1000, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
391, in /hermes/web01/b258/pow.thomas810/pictures/include/functions.inc.php on line 919


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hermes/web01/b258/pow.thomas810/pictures/include/functions.inc.php on line 1194

Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 143620 bytes) in /hermes/web01/b258/pow.thomas810/pictures/admin/include/functions.php on line 466

Offline

 

#2 2009-03-03 19:19:30

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Sync Error

Hi thomas,

The message displayed gives a lot of information, it tells you that the PHP script takes too much space in memory! That happens when you have many photos to synchronize.

The workaround is to first synchronize only the directories and then synchronize directories one by one.

Tell us if it works better this way :-)

Offline

 

#3 2009-03-03 19:22:54

thomas810
Member
2006-06-27
16

Re: Sync Error

is this something that is being worked on? I never had this problem with the 1.7 branch... could sync all at once... it did take a while... there are 10,000 pictures I have in the archive... but it never gave me an error.

Thanks for your suggestion.

Thom

Offline

 

#4 2009-03-03 19:24:52

thomas810
Member
2006-06-27
16

Re: Sync Error

Oh.. man... I just took a look... it occures to me that I have 100s of virtual directories... this work-around would be very time consuming... is there another way to do it?

Thanks,

Thom

Offline

 

#5 2009-03-04 21:51:04

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Sync Error

thomas810 wrote:

is this something that is being worked on? I never had this problem with the 1.7 branch... could sync all at once... it did take a while... there are 10,000 pictures I have in the archive... but it never gave me an error.

There was no rewrite on the synchronization process between 1.7 and 2.0. The only big change concerning photo addition is the ability to add a photo without synchronization with pLoader (photos are added one by one).

The simplified synchronization process is:

1. load in memory the list of existing physical categories
2. load in memory the list of filesystem directories
3. compare and create new physical categories

4. load in memory the list of existing photos
5. load in memory the list of filesystem photos
6. compare and create new photos

This algorithm is very efficient (very fast), but steps 4 and 5 become very memory consuming when you deal with 10,000 photos. This is why we have added the possibility to first synchronize categories (it only performs steps 1 to 3) and then synchronize only one physical category.

Offline

 

#6 2009-03-04 21:53:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Sync Error

thomas810 wrote:

Oh.. man... I just took a look... it occures to me that I have 100s of virtual directories... this work-around would be very time consuming... is there another way to do it?

What are "virtual directories"? do you mean "virtual categories"? if yes, don't take care of them as far as the synchronization process is concerned: virtual categories are not taken into account, simply because they have no associated directory.

Consequently, the important question is: how many physical categories do you have? how is your filesystem organized?

Offline

 

#7 2009-03-04 22:24:56

thomas810
Member
2006-06-27
16

Re: Sync Error

To answer your question, my physical file system is set up by date... I keep the online file structure roughly synced with my local file structure... every day when I put in pictures, I place them in a different folder for the day I put them in... for example, for today the name of the folder would be 20090304.  Makes it easy to find a picture from a specific date that way... I roughly updated it 2x a month and have been doing so for about 5 years, since my daughters were born... so there is a whole lot of physical directories. I then make virutal categories for the activities and people the pictures include and organize them by family Name >> First Name -- or -- Activity >> Activity date so someone can just go in and click on a family name then the individual person or activity.

So, syncing by individual directory would be a very time consuming process for me.

Offline

 

#8 2009-03-04 23:11:42

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Sync Error

All right, I've found one of your old topic : [Forum, topic 7688] migrating database (nice to see old community members still playing with Piwigo :-)

So, syncing by individual directory would be a very time consuming process for me.

I don't think so. The method I'm proposing was implemented to fit your exact need, ie you have directories that never have any new photo once you have synchronized. Once you have synchronized 20090304, you know it's totally useless to synchronize it in the future as you don't add any file inside.

Here is a scenario:

* On 2009-03-04, you add galleries/20090304 directory, you synchronize "only directories", Piwigo finds the "20090304" physical category, you select this new physical category and synchronize on "directories + files"

* On 2009-03-019, you add galleries/20090319 directory, you synchronize "only directories", Piwigo finds the "20090319" physical category, you select this new physical category and synchronize on "directories + files"

Offline

 

#9 2009-03-05 14:47:38

thomas810
Member
2006-06-27
16

Re: Sync Error

Humm... it seems to me this is the failure point... I go to "Categories " then "Synchronize " -- I sync the directories... which works... but when I then select "directories + files " and uncheck the boxs "only perform a simulation (no change in database will be made)" & "Search in subcategories " then click on the "Submit" button... I get the above error. How do you sync the individual file?

Offline

 

#10 2009-03-06 00:36:38

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Sync Error

You can't sync files one by one, only directories.

In the synchronization form, in the "reduce to single existing categories" block, you have to select the new directory, uncheck the "Search in subcategories" (because you wrote earlier that you had a single level directory organization) and then "Submit".

Offline

 

Board footer

Powered by FluxBB

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