• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Large board problem, Spam Cleaner eats up all available memory.

TimWF

Active member
#1
The Spam Cleaner functionality has come to the point where it is not functioning on our installation anymore (this is a 1.0 installation still, we have not yet made the move to 1.1). The ajax call to /forums/spam-cleaner/user.1/ results in an internal server error.

I believe this is the PHP error logged that is associated with the internal server error:

[13-Dec-2011 17:11:16] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /*****/forums/library/XenForo/Model/SpamCleaner.php on line 201
This makes me wonder if this error might be in some way related to something similar to a previous problem: http://xenforo.com/community/thread...g-multiple-posts-in-very-large-threads.18286/
 

TimWF

Active member
#2
A bit of an update on this. Looking at the code in the SpamCleaner.php model it looks like it is clearly linked to the looking up IP info that is causing the error. Unchecking the check IP box in the Spam Cleaner does allow the other functionality to work properly.

Also, here is a quick screen shot showing what is described in the first post in this thread.
Screen-Shot-2011-12-13-at-10.11.53-AM.png
 

Mike

XenForo developer
Staff member
#3
It must've matched a huge number of IPs. Makes me wonder if your server is behind a proxy, making all visitors appear to come from the same IP? :)

But either way, that could use a limit of some sort, though I'm not sure how limiting we should be just yet.
 

TimWF

Active member
#4
Wow, you are very right. That could have been quite damaging had it not run out of memory there!

Sounds like this is just a problem for us, but could see a limit with a warning being useful without a doubt. Thanks Mike!
 

digitalpoint

Well-known member
#7
On a side note, 128MB is the default setting for PHP and is really designed to prevent a script from running out of control. If you have your own server (probably since you have a big board) it might be a good idea to raise that up a bit since you control (for the most part) what scripts are being run and don't have to worry about other users on the server doing dumb stuff with their scripts. As an example, we run our PHP mem limit at 512MB for digitalpoint.com... for a normal page that the public can trigger/access it's rare it ever uses more than maybe 10MB. But there are occasions where from the admin side of this that a larger process is intentionally kicked off once in awhile that gets dangerously close to using up the 128MB default.