News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Sending newsletter to 350K member forum fails.

Started by Biology Forums, August 18, 2015, 12:34:10 AM

Previous topic - Next topic

Biology Forums

After I select all the groups I want to send a newsletter to, the following page (index.php?action=news;sa=mailingcompose) fails to load - it's just white. However, when I choose a smaller group of members to send to, it moves to the next page just fine. Does anyone else with a large forum have this problem?

The apache error log gives me:

PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 19 bytes) in /***/public_html/Sources/ManageNews.php on line 375, referer: http://***.com/index.php?action=news;sa=mailingmembers

:-\

How can I allot more memory if that's the case? You can cross out server hardware.

青山 素子

Wow, that's a lot of members. I don't think the newsletter function ever contemplated a number so high. Can you send in smaller batches?
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


LiroyvH

The error actually explains everything. It's not really an SMF error either, but a PHP warning.

But if you did not understand it, then a simple search here or on Google would yield instant results that you have to up PHP's memory_limit directive (in the server's php.ini) to something higher than what it is set at now. It's set *really* low right now.

Basically: fix your server configuration and it'll be happy again. :)


Quote from: 青山 素子 on August 18, 2015, 01:16:50 AM
Wow, that's a lot of members. I don't think the newsletter function ever contemplated a number so high. Can you send in smaller batches?

The newsletters here goes to that amount as well, no problem at all. :)
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

vbgamer45

Add this to the top top of your Sources/Managenews.php file below the <?php

@ini_set("memory_limit","256M");
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Biology Forums

#4
Quote from: vbgamer45 on August 18, 2015, 08:40:07 AM
Add this to the top top of your Sources/Managenews.php file below the <?php

@ini_set("memory_limit","256M");


Your suggestion worked.

Now, I am going to apply this globally with php.ini.

Edit:

Moving to this page (index.php?action=news;sa=mailingsend) after composing the message also produces a white screen.

PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 7728283 bytes) in Unknown on line 0, referer: http://***.com/index.php?action=news;sa=mailingcompose

Biology Forums

I added the directive into .htaccess

php_value memory_limit 256M

And it worked. Adding it to the master php.ini isn't enough because the local value overrides it.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

LiroyvH

Quote from: Shuban on August 18, 2015, 11:07:57 AM
I added the directive into .htaccess

php_value memory_limit 256M

And it worked. Adding it to the master php.ini isn't enough because the local value overrides it.


Hence why its discouraged to use .htaccess if you have full root access. :)
Altering in config works better for a variety of reasons for a variety of subjects, leaving it low in php.ini because a local value already exists is fixing an issue by altering the issue.
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

JBlaze

Also, using .htaccess by it's very nature slows down Apache :)
Jason Clemons
Former Team Member 2009 - 2012

青山 素子

Quote from: zilladotexe on August 18, 2015, 06:06:04 PM
Also, using .htaccess by it's very nature slows down Apache :)

Even if you don't have an htaccess file. If you allow overrides, Apache checks each directory up to the document root for overrides (htaccess files).
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: