Skip to content

Huge folders - Picture view issue #565

Closed

Description

@szporwolik

It's impossible to browse huge photo folder with the Pictures plugin.

I have folder tree which contains about 30000 photos (all JPG files, approx. 1,5mb each); when I try to browse with "Pictures" I get the following error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12864 bytes) in /home/xxx/public_html/share/lib/image.php on line 419

System information:
ownCloud 4.5.2
Linux XXX 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:
PHP 5.3.x

Activity

  1. DeepDiver1975 commented on Nov 27, 2012

    @DeepDiver1975
    Contributor

    hmm - a max mem size of 32MB seams a little bit low
    As a workaround you can increase the memory limit in your .htaccess:

    php_value memory_limit 128M
    

    May this helps until we find a real solution.
    @karlitschek Does it make sense to specify a minimum ram requirement and check this on setup or in the admin section? THX

  2. birdyisme commented on Dec 1, 2012

    @birdyisme

    hi , i have the same issue.
    To solve it i have made these change on apps/gallery/lib/managers.php

    rewrite function getThumbnailInfo :

    public function getThumbnailInfo($path) {
            $arr = DatabaseManager::getInstance()->getFileData($path);
    
            if (!$arr) {
                if (file_exists ($path)) {
                    $size = getimagesize($path);
                    $arr = DatabaseManager::getInstance()->setFileData($path, $size[0], self::THUMBNAIL_HEIGHT);
                } else {
                    \OC_Log::write(self::TAG, 'File '.$path.' don\'t exists', \OC_Log::WARN);
                    return false;
                }
    
            }
            $ret = array('filepath' => $arr['path'],
                         'width' => $arr['width'],
                         'height' => $arr['height']);
            return $ret;
        }
    

    I don't know if this is the best method, but it work ;-)

  3. BernhardPosselt commented on Feb 9, 2013

    @BernhardPosselt
    Contributor

    Please send a pull request

  4. BernhardPosselt commented on Feb 26, 2013

    @BernhardPosselt
    Contributor

    cc @icewind1991 is this fixed in the new pictures app?

  5. icewind1991 commented on Feb 26, 2013

    @icewind1991
    Contributor

    I think it is, I never had any memory problems with the new pictures app with 15k+ images

  6. BernhardPosselt commented on Feb 26, 2013

    @BernhardPosselt
    Contributor

    Unless there are any furhter problems I'll close this issue. Please check out the newer version and report in if you've still have problems to reopen the issue.

  7. locked as resolved and limited conversation to collaborators on Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions