• I’ve been trying to upload a relatively large file (16.1 MB), and I’ve been FTPing the file to the uploads folder for the month and then trying to use Media from FTP to put it in my Media Library. I previously did this with other, bigger files and there was no problem. Now, it returns an error when I try to bring in that file or other big files. The error is “Out of memory (allocated 39321600) (tried to allocate 276803 bytes) in /homepages/14/d117110337/htdocs/tknn/wp-includes/ID3/getid3.php on line 1664.” The problem does not seem to be my amount of available storage on my web host as I checked that and I am in single digits. In addition, my memory used (based off the Server IP & Memory Usage Display plugin) is only 26%. I uploaded four files that combined are roughly equal to (but more than to be safe) the 16.1 MB and they all uploaded successfully.

    Any help in fixing this problem would be greatly appreciated. Please let me know if more information is needed.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It appears you’re allocating only 32MB to PHP. Try increasing it to 64 or 128M.

    See this for guidance:

    https://docs.woothemes.com/document/increasing-the-wordpress-memory-limit/

    Thread Starter Tfkalk

    (@tfkalk)

    I have done the first step in the past and I don’t believe I have a php.ini because I am not local hosted. I went to edit the .htaccess, but I was not sure where to put the line of code. I have not edited my .htaccess before, so it is the default.

    Also, apologies for my late response. I must’ve missed the email notification.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please contact tech support for your host if you’re unable to increase the memory allocated to PHP.

    Thread Starter Tfkalk

    (@tfkalk)

    I should be able to, I’m just not sure where to put the line of code that the website you provided has. (php_value memory_limit 64M)

    Currently it is:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Borge

    (@joeborge0914)

    Try adding this in your wp-config.php

    define('WP_MEMORY_LIMIT', '128M');
    
    define('WP_MAX_MEMORY_LIMIT', '256M');

    For sure you have this set up in your default-constants.php as

    define('WP_MEMORY_LIMIT', '64M');
                            } else {
                                        define('WP_MEMORY_LIMIT', '40M');
                            }
                }
    
                if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
                            define( 'WP_MAX_MEMORY_LIMIT', '64M' );

    This causes you from using the allowable RAM. However, if you add that code mentioned above in the wp-config.php, that should work.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Add the lines to .htaccess *before* the #BEGIN WordPress line

    Thread Starter Tfkalk

    (@tfkalk)

    Borge,

    Do you mean make sure I have that set up in default-constants.php? In that file, I have

    // set memory limits
    if ( !defined(‘WP_MEMORY_LIMIT’) ) {
    if ( is_multisite() ) {
    define(‘WP_MEMORY_LIMIT’, ’64M’);
    } else {
    define(‘WP_MEMORY_LIMIT’, ’40M’);
    }
    }

    if ( ! defined( ‘WP_MAX_MEMORY_LIMIT’ ) ) {
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );
    }

    If I need to change it to what you have, let me know. Thanks!

    Thread Starter Tfkalk

    (@tfkalk)

    sterndata,

    I tried adding the line of code before, as you said. The website then had an Internal Service Error.

    Borge

    (@joeborge0914)

    If you host allow 512M RAM, change it into

    if ( !defined(‘WP_MEMORY_LIMIT’) ) {
    if ( is_multisite() ) {
    define(‘WP_MEMORY_LIMIT’, ‘128M’);
    } else {
    define(‘WP_MEMORY_LIMIT’, ‘256M’);
    }
    }

    if ( ! defined( ‘WP_MAX_MEMORY_LIMIT’ ) ) {
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘512M’ );
    }

    Let me know if this works..

    Thread Starter Tfkalk

    (@tfkalk)

    Borge,

    Thank you again for your response. I added

    define('WP_MEMORY_LIMIT', '128M');
    
    define('WP_MAX_MEMORY_LIMIT', '256M');

    into wp-config.php. And then added

    if ( !defined('WP_MEMORY_LIMIT') ) {
    if ( is_multisite() ) {
    define('WP_MEMORY_LIMIT', '128M');
    } else {
    define('WP_MEMORY_LIMIT', '256M');
    }
    }
    
    if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
    define( 'WP_MAX_MEMORY_LIMIT', '512M' );
    }

    to default-constants.php. However, it still throws the error of Fatal error: Out of memory (allocated 39321600) (tried to allocate 276803 bytes) in /homepages/14/d117110337/htdocs/tknn/wp-includes/ID3/getid3.php on line 1664.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please contact tech support for your host if you’re unable to increase the memory allocated to PHP.

    Thread Starter Tfkalk

    (@tfkalk)

    As I’ve been trying to figure this out, I discovered some more information that may help. I moved my plugins into a new folder, just to see if there was a plugin error. As I moved them back in, I noticed I was able to now upload the file. However, I noticed that as I moved more back and *activated* more, I was no longer able to upload the file. Would this re-enforce the hypothesis that my PHP memory needs to be increased?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Would this re-enforce the hypothesis that my PHP memory needs to be increased?

    definitely

    Thread Starter Tfkalk

    (@tfkalk)

    Okay, thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Out of Memory Error Uploading Large File’ is closed to new replies.