Results 1 to 7 of 7

Thread: Sending E-Mail with attachments -> Fatal error (memory size exhausted)

  1. #1
    scrut is offline Member
    Join Date
    Sep 2009
    Posts
    16

    Default Sending E-Mail with attachments -> Fatal error (memory size exhausted)

    When I try to send an eMail with a 3.5 MB attachment (PDF-Document in the SugarCRM Document manager), I get this error:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 5024539 bytes) in /var/www/web0/html/include/database/MysqliManager.php on line 185

    Despite the error, the CRM seems to send the mail - but it does not show up in the log of the contact (I always attach CRM-Emails to contacts)

    Restarting the server did not help

    I am using SugarCRM 5.2 CE

    Any ideas?

    Thanks

    s.
    Last edited by scrut; 2009-09-15 at 09:20 PM.

  2. #2
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Sending E-Mail with attachments -> Fatal error (memory size exhausted)

    Increase the memory limit in php.ini and restart Apache.

  3. #3
    scrut is offline Member
    Join Date
    Sep 2009
    Posts
    16

    Default Re: Sending E-Mail with attachments -> Fatal error (memory size exhausted)

    Thanks for your reply. The corresponding settings are already quite large:

    memory_limit = 128M
    upload_max_filesize = 30M
    post_max_size = 20M
    max_execution_time = 60
    max_input_time = 120
    session.save_path = /tmp

    Just for "fun" I increased memory_limit = 256M - but the error message stays the same.

  4. #4
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Sending E-Mail with attachments -> Fatal error (memory size exhausted)

    FWIW, this is my development stack php.ini:

    max_execution_time = 300 ; Maximum execution time of each script, in seconds
    max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
    ;max_input_nesting_level = 64 ; Maximum input variable nesting level
    memory_limit = 1128M ; Maximum amount of memory a script may consume (16MB)

    I don't run out of memory or have other problems with these settings.

  5. #5
    scrut is offline Member
    Join Date
    Sep 2009
    Posts
    16

    Default Re: Sending E-Mail with attachments -> Fatal error (memory size exhausted)

    Well, the sugar install manual asks for >40M, so my 128 or 256 is way more than that. Plus, all I want to do is send one single E-Mail to one recipient with an attachment of 3,5M - I really can't see how Sugar can run out of memory doing that.

    What puzzles me is the fact that the error message stayed the same even after I changed the memory_limit from 128 to 256M. In addition, the error message said that the limit was something like 64M - but my setting in php.ini was always 128M.

    Any insights?

    thanks

    s.

  6. #6
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Sending E-Mail with attachments -> Fatal error (memory size exhausted)

    You could also check the 'upload_maxsize' => variable in config.php

  7. #7
    scrut is offline Member
    Join Date
    Sep 2009
    Posts
    16

    Default Re: Sending E-Mail with attachments -> Fatal error (memory size exhausted)

    I set that to 30M, but the error message stays exactly the same.
    I suspect that the limit must be set somewhere else - yet I can't imagine that it takes more than 64M to send a 3M document...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Fatal error: Allowed memory size of 52428800 bytes exhausted
    By retheesh in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2009-08-18, 11:19 AM
  2. fatal error Allowed memory size of 134217728 bytes exhausted
    By vishwasrao in forum Developer Help
    Replies: 9
    Last Post: 2009-02-04, 04:16 AM
  3. Replies: 2
    Last Post: 2009-01-19, 04:15 AM
  4. Fatal error: Allowed memory size of 16777216 bytes exhausted
    By SerwiseAG in forum Installation and Upgrade Help
    Replies: 4
    Last Post: 2008-11-12, 11:43 AM
  5. Replies: 1
    Last Post: 2006-06-19, 09:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •