Webmail error - Fatal error: Allowed memory size of 8388608 bytes exhausted (tried t

Cash

Well-Known Member
Jun 9, 2004
47
0
156
Dear Sir,

Today When I access to my webmail, i saw:


Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4097 bytes) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/imap_general.php on line 92

May I know how to fix it?

My php.ini memory is already set to 64M
 

rpmws

Well-Known Member
Aug 14, 2001
1,787
10
318
back woods of NC, USA
bump up the memory in the whm tweaks for cpanel process see if that helps
 

tom5599

Registered
May 15, 2007
4
0
151
I have a client getting a similar error message when she tries to send an attachment using Horde.

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1072512 bytes) in /usr/local/cpanel/base/horde/lib/Horde/MIME/Part.php on line 1027

Other error

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 456453 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 788

One attachment was 1 meg and the other was 162kb.

I looked under tweaks and did not see a line to increase the memory can you tell me which line I should increase.

Just as a note...she can send attachments using squirrel mail but not Horde in Horde she gets the error messages.

Any help is greatly appreciated.

Tom
 

rpmws

Well-Known Member
Aug 14, 2001
1,787
10
318
back woods of NC, USA
I have a client getting a similar error message when she tries to send an attachment using Horde.

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1072512 bytes) in /usr/local/cpanel/base/horde/lib/Horde/MIME/Part.php on line 1027

Other error

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 456453 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 788

One attachment was 1 meg and the other was 162kb.

I looked under tweaks and did not see a line to increase the memory can you tell me which line I should increase.

Just as a note...she can send attachments using squirrel mail but not Horde in Horde she gets the error messages.

Any help is greatly appreciated.

Tom
what memory limit do you see in:
/usr/local/cpanel/3rdparty/etc/php.ini


Try increasing that and then restart cpanel.
 

tom5599

Registered
May 15, 2007
4
0
151
It was showing 8M, I increased that to 32M and increase the timeout setting to 60sec from 30sec.

All is working fine now!!

THANK YOU VERY MUCH!!!

Tom
 

Bailey

Well-Known Member
Aug 12, 2001
120
1
318
Wisconsin
what memory limit do you see in:
/usr/local/cpanel/3rdparty/etc/php.ini


Try increasing that and then restart cpanel.
However, won't that be overwritten with the next cPanel update? e.g., tonight?

:D Bailey
 

deddy

Well-Known Member
Oct 13, 2003
147
1
168
Did you found the fix.

It doesn't matter what memory settings we use (128M, 256M, 512M)
the message

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 34868133 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 824

occurs if the attachment is bigger than about 10MB.
 

lsteacker

Registered
Sep 23, 2008
1
0
51
I am bumping this because I am having the same problem. All the php.ini files I look in have the limit set to 128MB. Changing it doesn't fix anything. Anyone have a solution for this one?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
15
313
Houston, TX
cPanel Access Level
Root Administrator
I am bumping this because I am having the same problem. All the php.ini files I look in have the limit set to 128MB. Changing it doesn't fix anything. Anyone have a solution for this one?
Where are you encountering this problem? The webmail interface? Somewhere in the cPanel interface? On a script you uploaded to your Apache server?

Are you on a VPS or a dedicated server?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
Both the SMTP and MIME PEAR modules used by Horde have flaws that cause them to consume insane amounts of memory. The only reliable workaround found is to modify the SMTP and MIME modules, setting the memory limits directly within them.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
15
313
Houston, TX
cPanel Access Level
Root Administrator
easy way to solve thit problem is little code to you .htaccess file :
php_value memory_limit 300M
Keep in mind that webmail clients are served via cpsrvd, not Apache. As a result, creating a .htaccess file would be ineffective. For webmail clients, you can edit the php.ini for that webmail client if you desire. Usually the path to a webmail application is /usr/local/cpanel/3rdparty/etc/{APPNAME}/ and inside that directory you can create a php.ini file (if one does not already exist).
 

lehels

Well-Known Member
Jul 10, 2006
91
0
156
The same situation we are experiencing after downgrade from Release to Stable. There is a php.in in horde/ folder with memory_limit 256M, but does not take any effect -
Fatal error: Out of memory (allocated 92274688) (tried to allocate 28331723 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 836 -

Any to suggest a possible solution [?].

Thanks,
Lehel
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
14
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
The same situation we are experiencing after downgrade from Release to Stable. There is a php.in in horde/ folder with memory_limit 256M, but does not take any effect -
Fatal error: Out of memory (allocated 92274688) (tried to allocate 28331723 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 836 -

Any to suggest a possible solution [?].

Thanks,
Lehel
Please refer to this earlier post: cPanel Forums - View Single Post

Both the SMTP and MIME PEAR modules used by Horde have flaws that cause them to consume insane amounts of memory. The only reliable workaround found is to modify the SMTP and MIME modules, setting the memory limits directly within them.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
14
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
what memory limit do you see in:
/usr/local/cpanel/3rdparty/etc/php.ini

Try increasing that and then restart cpanel.
It was showing 8M, I increased that to 32M and increase the timeout setting to 60sec from 30sec.

All is working fine now!!

THANK YOU VERY MUCH!!!

Tom
How to do that!
If referring to the memory limits defined in a PHP configuration file, the files named "php.ini" may be modified using any command-line text editor (e.g., vi, vim, nano, pico); here are two commands you may use to locate the current value:
Code:
# grep -i "^memory_limit" /usr/local/cpanel/3rdparty/etc/php.ini
# grep -i "^memory_limit" /usr/local/cpanel/3rdparty/etc/horde/php.ini
Here is an example of the command-line output from the above examples and in this case there is a PHP memory limit of 128MB defined as "128M"; the 8MB reference I am seeing only in a descriptive comment on the same line:
Code:
# grep -i "^memory_limit" /usr/local/cpanel/3rdparty/etc/php.ini
memory_limit = 128M			; Maximum amount of memory a script may consume (8MB)
# grep -i "^memory_limit" /usr/local/cpanel/3rdparty/etc/horde/php.ini
memory_limit = 128M			; Maximum amount of memory a script may consume (8MB)
 
Last edited:

lehels

Well-Known Member
Jul 10, 2006
91
0
156
Still not good

The result is the same,

I configured 256M in 3 php.ini-s [/usr/local/cpanel/3rdparty/etc/php.ini + roundcube/php.ini horde/php.ini], - anyway the main php.ini after cpanel restart - resets to 128M, even added
ini_set('memory_limit','256M'); in SMTP.php + mime.php .

The same error occurs [horde]:

Fatal error: Out of memory (allocated 92274688) (tried to allocate 28331707 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 836

cPanel 11.25.0-S44718 - WHM 11.25.0 - X 3.9
CENTOS 5.4 x86_64 standard on serverXXX

So wherefrom is this 88MB coming - 92274688 bits /same length as my above test?

Roundcube - remains in "Sendind message" status, and has almost the same /Out of memory/ according to the error_log:

[04-May-2010 09:02:23] PHP Fatal error: Out of memory (allocated 105906176) (tried to allocate 28331323 bytes) in /usr/local/cpanel/base/3rdparty/roundcube/program/lib/Net/SMTP.php on line 887
[04-May-2010 09:07:30] PHP Fatal error: Out of memory (allocated 105906176) (tried to allocate 28331329 bytes) in /usr/local/cpanel/base/3rdparty/roundcube/program/lib/Net/SMTP.php on line 887

The only working Webmail is SquirrelMail.
Any other hints to rewrite the memory_limit [?] or to make those other 2 webmails working with ~10MB attached files?

Regards,
Lehel
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
14
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
The result is the same,

I configured 256M in 3 php.ini-s [/usr/local/cpanel/3rdparty/etc/php.ini + roundcube/php.ini horde/php.ini], - anyway the main php.ini after cpanel restart - resets to 128M, even added
ini_set('memory_limit','256M'); in SMTP.php + mime.php .

The same error occurs [horde]:

Fatal error: Out of memory (allocated 92274688) (tried to allocate 28331707 bytes) in /usr/local/cpanel/3rdparty/lib/php/Net/SMTP.php on line 836

cPanel 11.25.0-S44718 - WHM 11.25.0 - X 3.9
CENTOS 5.4 x86_64 standard on serverXXX

So wherefrom is this 88MB coming - 92274688 bits /same length as my above test?

Roundcube - remains in "Sendind message" status, and has almost the same /Out of memory/ according to the error_log:

[04-May-2010 09:02:23] PHP Fatal error: Out of memory (allocated 105906176) (tried to allocate 28331323 bytes) in /usr/local/cpanel/base/3rdparty/roundcube/program/lib/Net/SMTP.php on line 887
[04-May-2010 09:07:30] PHP Fatal error: Out of memory (allocated 105906176) (tried to allocate 28331329 bytes) in /usr/local/cpanel/base/3rdparty/roundcube/program/lib/Net/SMTP.php on line 887

The only working Webmail is SquirrelMail.
Any other hints to rewrite the memory_limit [?] or to make those other 2 webmails working with ~10MB attached files?

Regards,
Lehel
Regarding Roundcube, I believe the issue may be alleviated in a recent Beta version from the upstream vendor; the following is the applicable change log entry and reference to the related bug report that includes verbose details:
Change Log – Roundcube Webmail