server_add : infinite loop ?

fabiin

Joined: 2009-09-18
Posts: 5
Posted: Tue, 2011-01-18 14:38

Hello,

I have a problem with server_add module.

When I add a folder, it looks like it goes into infinite loop. The output is : "Scanned X directories".
At each refresh, X increases without stopping.
There are no more than 15 folders in the folder I'm trying to add.

This problem does not occur in Beta or RC.
It occured in 3.0 update.

I also tried a 3.0.1 update, but it changed nothing.

Is somebody have the same issue ? Have you an idea to help me ?

Thanks

 
JB2448
JB2448's picture

Joined: 2010-10-02
Posts: 26
Posted: Wed, 2011-01-19 01:25

I've been having the same problem. As of this post, the module has apparently scanned almost 180,000 directories, which I an 100% sure I do not have. Unfortunately, I have no clue what the problem is. I have tried deleting and reinstalling the module, tried a different path, everything, but to no avail. Sorry I couldn't be of more help :(.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2011-01-19 05:35

I can't reproduce this in 3.0.1 -- make sure when you upgrade to 3.0.1 you run the upgrader or it won't work. Is there anything in your gallery3/var/logs logfiles?
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
fabiin

Joined: 2009-09-18
Posts: 5
Posted: Wed, 2011-01-19 08:49

Hello,

I've only this in the last file of /var/logs :

< ? php defined('SYSPATH') or die('No direct script access.'); ? >

I've attached a screenshot of the upgrader screen and a video where you can see the phenomenon.

I will try today or tommorrow to make a fresh install of gallery 3.

 
mmseng

Joined: 2011-01-19
Posts: 17
Posted: Wed, 2011-01-19 14:44

I have the same problem. I only have one log with one error, which matches the above posted error. FWIW, I upgraded from 3.0, as opposed to installing 3.0.1 directly, although I might try a fresh install of 3.0.1 when I get time later.

 
mmseng

Joined: 2011-01-19
Posts: 17
Posted: Wed, 2011-01-19 21:22

Confirmed same result on a fresh install of 3.0.1. TBH. Even if this gets fixed the Server Add window still needs to let you select multiple files at once.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2011-01-20 03:52

Hrm. Ok, can you look in the "server_add_entries" table and let me know what you see there? It's going to have a ton of entries, so I suggest that you truncate the table, then do a server add again, let it get up to a few hundred files and then post a link to a dump of the table. That should let me figure it out.

Also: the server add dialog *does* let you select multiple files, just single click each file. I know the UI there needs improvement.

NOTE: I found a bug when testing out single click and just pushed a new fix so you probably want to upgrade.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
fabiin

Joined: 2009-09-18
Posts: 5
Posted: Thu, 2011-01-20 09:15

I've just upgrade to lastest git master. No change for this bug.

 
mmseng

Joined: 2011-01-19
Posts: 17
Posted: Fri, 2011-01-21 00:18
bharat wrote:
Hrm. Ok, can you look in the "server_add_entries" table and let me know what you see there? It's going to have a ton of entries, so I suggest that you truncate the table, then do a server add again, let it get up to a few hundred files and then post a link to a dump of the table. That should let me figure it out.

I think it's pretty clearly scanning ALL directories on the entire server, recursively, including those that don't belong to me. The table in my original DB (3 updated to 3.0.1) has over 500k entries. The table from my new DB (fresh install of 3.0.1, where I've only attempted ServerAdd twice) has about 8k entries. Here are the dumps:

Original DB (3 updated to 3.0.1): http://bluehost.mattseng.com/temp/server_add_entries_original.sql.gz
New DB (fresh 3.0.1): http://bluehost.mattseng.com/temp/server_add_entries_new.sql.gz

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2011-01-21 07:50

Ah, ok yeah that makes sense. I have found and fixed the issue in 3.0.1 b11 -- try again please! Also if you go delete the old server add maintenance tasks it'll clean out your huge server_add_entries table...
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
dmross

Joined: 2011-01-20
Posts: 3
Posted: Fri, 2011-01-21 13:25

Hi Bharat,

Just placeing my comment in the correct thread.

I'm new to Gallery3.
I made an installation of your last code useing Git.
When I try to use server add, it keeps scanning folders forever. In one of my tries it scanned around 22000 folders in a directory that has only one subfolder and then the photos. This directory doesn't have any photos, only the subfolder, is this a problem?
When I tryed to add a photo only the server add made a new empty album with the same name of the photo.

As requested by Dave, I sent you in private message the access information to my Gallery3 installation.

Please, I'll be glad if you can help

 
mmseng

Joined: 2011-01-19
Posts: 17
Posted: Fri, 2011-01-21 23:47

BTW, any reason I couldn't just symlink my var folder for temporarily for upgrading purposes (instead of moving the folder)?

Obviously I would put the old install in maintenance mode first. I'm also guessing it would be dangerous to un-maintenance-mode the old install afterward (so maybe that defeats the purpose?).

EDIT: Also, is there no upgrader function in the last dev release (d8715ff)? Browsing to it returns a 404.

SECOND EDIT: Nevermind I forgot to add "index.php" in the path. However, now going to http://www.example.com/gallery3/index.php/upgrader redirects me to the installer page, which can't continue because the database already exists.

THIRD EDIT: Double nevermind. I was having some permissions issues because I was trying to move/rename directories via FTP while also logged into the shell and being CD'd to those directories. All is sorted now. About to test ServerAdd...

FOURTH EDIT: Hooray! ServerAdd works. Tested with selecting individual files, selecting 1 directory, and selecting 2 directories at once. Build 14 (d8715ff). Thanks!