Support » Plugins » [Plugin: NextGEN Gallery] GD uses lots of memory for high resolutions

  • Hi,

    I’ve got a few pictures with relatively high resolutions of about 2500 x 2000. When I upload them through the GUI NGG can’t create thumbnails from them, I get the error “Memory Limit exceeded. Require: 38.14 MB”.

    When I resize the picture to 2000 x 1500 before uploading I get the error “Fatal error: Out of memory (allocated 22282240) (tried to allocate 2000 bytes) in /home/www/wp-content/plugins/nextgen-gallery/lib/ on line 183”

    Resolution 1500 x 1250: The same, only “allocate 6000 bytes”

    The resolution 1280 x 960 works fine.

    Is there a way around this problem other than increasing the memory limit? I thought 32 MB would be enough and actually thought NGG would take the work of manual resizing from my hands…

    btw: The actual filesize has no effect on the error messages.

    Furthermore, I set the NGG options to resize the images – do I have to start this manually or is there a way to get NGG to resize all uploaded images (which of course would first require the obove problem to be solved)?

    Here is my server config:

    Server- Einstellungen
        * Betriebssystem : Linux
        * Server : Apache/1.3.34 (Debian) PHP/5.2.6
        * Speicherverbrauch : 14.4 MByte
        * MySQL Version : 5.0.45
        * SQL Modus : Nicht gesetzt
        * PHP Version : 5.2.6
        * PHP Safe Mode : Aus
        * PHP Allow URL fopen : An
        * PHP Memory Limit : 32M
        * PHP Max Upload Größe : 30M
        * PHP Max Post Größe : 30M
        * PHP Max Script Execute Time : 30s
        * PHP Exif Modul : Ja ( V1.4 )
        * PHP IPTC Modul : Ja
        * PHP XML Modul : Ja
    Grafik Bibliothek
        * GD Version : bundled (2.0.34 compatible)
        * FreeType Support : Ja
        * FreeType Linkage : with freetype
        * T1Lib Support : Nein
        * GIF Read Support : Ja
        * GIF Create Support : Ja
        * JPG Support : Ja
        * PNG Support : Ja
        * WBMP Support : Ja
        * XPM Support : Ja
        * XBM Support : Ja
        * JIS-mapped Japanese Font Support : Nein

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello Janzomaster

    I had a similar problem when creating thumbnails. This solution worked for me:



    forgot to say the file you need to edit is if you’re using ngg 1.02


    Increasing the memory limit does solve the first error message but the others stay the same, even if I increase the memory limit to 256M.
    Is there any other thing I could do?

    I continue to have problems creating thumbnails for “some” of my larger landscape photos.

    I have increased my memory to 500MB throughout, and the change is visible in my overview page. I am running PHP5. Also visible in the overview. I have run the memory test.php and passed. Also, I have un-commented line #168 re: ‘memory_limit’ to 500.

    The error I repeatedly receive is
    Fatal error: Out of memory (allocated 41156608) (tried to allocate 11264 bytes) in /home/asdff/public_html/asdfasdf/wp-content/plugins/nextgen-gallery/lib/ on line 183

    line 183 is:
    $this->oldImage = ImageCreateFromJpeg($this->fileName);

    Here are my settings:
    Operating System : Linux
    Server : Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/
    Memory usage : 11.25 MByte
    MYSQL Version : 5.0.67-community
    SQL Mode : Not set
    PHP Version : 5.2.8
    PHP Safe Mode : Off
    PHP Allow URL fopen : On
    PHP Memory Limit : 500M
    PHP Max Upload Size : 500M
    PHP Max Post Size : 500M
    PHP Max Script Execute Time : 30s
    PHP Exif support : Yes ( V1.4 )
    PHP IPTC support : Yes
    PHP XML support : Yes

    GD Version : bundled (2.0.34 compatible)
    FreeType Support : Yes
    FreeType Linkage : with freetype
    T1Lib Support : No
    GIF Read Support : Yes
    GIF Create Support : Yes
    JPG Support : Yes
    PNG Support : Yes
    WBMP Support : Yes
    XPM Support : Yes
    XBM Support : Yes
    JIS-mapped Japanese Font Support : No

    ANY IDEAS? I am stuck.

    is there a way I can download a “ngg-db.php”
    with a smaller “PHP Memory limit” ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: NextGEN Gallery] GD uses lots of memory for high resolutions’ is closed to new replies.