Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Gallery showns no images any more #1121

Open
ftree opened this issue May 21, 2013 · 10 comments
Open

Gallery showns no images any more #1121

ftree opened this issue May 21, 2013 · 10 comments

Comments

@ftree
Copy link

ftree commented May 21, 2013

I am still uploading a lot of images (>70.000) to my own owncloud Server.
I have seen that it took a long time to show the the top (3) folders in the gallery. The other subfolder are fast.
I seems that, the more images a user have, the longer it take.

But now it doesn't show anything any more.
I have tried it with another user (which has only a few images), and there are the folder and images are shown.

I haven't done any changes on the system.
I have ownCloud 5.0.5 on apache with MySql on Linux Debian. (Last Version of everything)

In the ownCloud.log File I have seen this
{"app":"PHP","message":"Allowed memory size of 536870912 bytes exhausted (tried to allocate 80 bytes) at /var/.../lib/files/view.php#909","level":4,"time":1368819016}

So for me it seems that there is a select over all limages (or so) and therefore it takes to much memory. !!Only for showing three folders.!!
Maybe the problem is in the selecting function.

@MorrisJobke
Copy link
Contributor

cc @icewind1991

@ftree
Copy link
Author

ftree commented Jun 20, 2013

I looked in the code to find the problem.
I found out the problem ist the getimages.php file.
This line $images = \OC\Files\Filesystem::searchByMime('image'); loads all Files from a user from the Databse. And if there are to many files. the memory gets full.

It should only load the Data from the selected folder. The images and the names of the folders. And maybe the preview images of the subfolders.

@ftree
Copy link
Author

ftree commented Jul 19, 2013

I have rewritten the gallery app.
You can download it here: https://github.com/ftree/gallery2
This version loads only the actual folder. So performance depends not on the amount of files. I have testet it with about >70000 files

@ostasevych
Copy link

Thank you! That worked for me :)

@othell-sr
Copy link

I was getting an error that had the same result... Just a blank gallery and and out of memory error message:

{"app":"PHP","message":"Allowed memory size of 268435456 bytes exhausted (tried to allocate 27082251 bytes) at /var/www/owncloud/apps/gallery/ajax/getimages.php#47","level":4,"time":"2013-09-15T02:

But then I found the gallery2 rewrite by ftree and it did not produce that error. The gallery2 page even loaded and displayed the proper root folder... Unfortunately it did produce its own error after clicking that root folder. :-(

{"app":"PHP","message":"Undefined offset: 1 at /var/www/owncloud/apps/gallery2/ajax/getalbuminfo.php#14","level":2,"time":"2013-09-15T03:06:05+00:00"}

@ftree
Copy link
Author

ftree commented Sep 15, 2013

Plesse can you open an issue in my galler2 repository. Tham I will not forget it. Thanks

@othell-sr
Copy link

As requested... :-)

@fossxplorer
Copy link

I don't see the file getimages.php inside ajax/ ?

@ftree
Copy link
Author

ftree commented Oct 1, 2013

In the original gallery or in my gallery2 ?
In gallery2 there is no getimages.php any more. The file getalbuminfo.php does the loading now.

@tluhh
Copy link

tluhh commented Feb 8, 2014

Folks: I am really wondering about OC6 is unable to support a higher amount of pictures in the gallery properly. This is a key feature for sure. Also noticing gallery2 not working with OC6 nor with encrypted files. No 3rd party app available too and no progress made in gallery/gallery2 for quite a while...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants