Help - Search - Members - Calendar
Full Version: Comment throttling woes
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
smeg
Ok, I really am not keen on the new comment throttling "feature" ...

From my office, there are three or maybe slightly more people who view my blog.

There have been no comments on it from here today, including any of the other blogs my MT install handles.

I also have

CODE
ThrottleSeconds 0


In my MT.CFG file.

I just tried to send a comment and got:

In an effort to curb malicious comment posting by abusive users, I've enabled a feature that requires a weblog commenter to wait a short amount of time before being able to post again. Please try to post your comment again in a short while. Thanks for your patience.

ARG!!! I thought I turned it off! I hadn't clicked send multiple times, I hadn't posted shortly after someone else.

I am running MT Blacklist, but turning it off doesn't help.

Ideas? I don't want to downgrade (if it's even possible), but it would be nice to be able to comment in my own entries smile.gif

smeg
nammer
Okay, I was able to comment successfully twice; are you still experiencing this problem? You might consider the adaptions of the throttling feature detailed in Stepping Stones to a Safer Blog.

Donna
smeg
QUOTE (nammer @ Feb 2 2004, 11:10 PM)
Okay, I was able to comment successfully twice; are you still experiencing this problem?  You might consider the adaptions of the throttling feature detailed in Stepping Stones to a Safer Blog.

I'll take a look at that link later on ... I can post fine from home, it just seems when I hit it from work I get the warning sad.gif

Today for example, I couldn't post at all from the office.
nammer
Is there any way at all you could have inadvertently blacklisted your work IP? I just have to ask...smile.gif

Donna
philringnalda
IP banning should give a "You are not allowed to comment" message. The "short amount of time" message should only come around if it thinks that either you've commented once in the last ThrottleSeconds, or 8 times in 10 times ThrottleSeconds (unless I'm misreading it, even after it bans your IP for doing that, it says to wait a short amount of time and try again).

So while it's worth looking to be sure you haven't banned your IP for that, it must be getting confused about how often you've commented recently anyway. My first guess would be a comment that has the wrong date, since a comment added in the future would count as being in the last ThrottleSeconds. Got MySQL and phpMyAdmin? Just browse the mt_comment table, click the comment_created_on header once to sort from earliest to latest, and then again to sort from latest to earliest, and see if the first one listed is in the future.
c-squared
Cross-posted from this thread...

I turned off throttling (ThrottleSeconds 0) less than a week ago, and some commenters on my site are still getting throttled.

I've talked to a couple of those people, and it seems that the throttling occurs when they switch between multiple blogs (hosted on the same site) and comment. The amount of time between posts doesn't actually matter, since ThrottleSeconds is set to 0 anyway.

This would also explain a problem we had in the past, when commenters complained that they would be throttled for no apparent reason, even if it had been an hour between comments. For example: Say, at 1 o'clock, Joe commented on Jenny's blog; then, at 2 o'clock, he'd try to comment on Julia's blog (also on the same site), at which point he'd be throttled.

I've tested it numerous times now, and I've been able to reproduce the bug each time. It does seem that after more than an hour or so, the throttling mechanism "forgets" the commenter and allows him to comment again.

http://www.beanbagcentral.com/ccosas/
http://www.beanbagcentral.com/jenny/
http://www.beanbagcentral.com/julia/
http://www.beanbagcentral.com/kristen/
http://www.beanbagcentral.com/tanya/
philringnalda
Yep, the throttle is installation-wide, for good or ill.

ThrottleSeconds 0 doesn't actually turn throttling off, it just says "you can't have already commented once since 'now'". So I'd say there's either something wrong with now on your system, or there's something buggy in the way the throttle figures now.

What timezone is your server in, and what timezone(s) are the blogs in? When you add a comment (in each blog) are all the times correct, for the blog timezones? Is the server clock right? Do you need to add a comment to a blog in a later/earlier timezone to get throttled on one in an earlier/later timezone?
c-squared
Most of my bloggers (including myself) are CST (GMT -6), but I have one who's EST (GMT -5, one hour earlier).

Just tested it. Yup. That was it.

So, I guess what was happening was people were posting to the EST blog first, but then upon posting to a CST blog, they'd get throttled.

Looks like we'll have to move her into our timezone for now. Thanks!
sugi_grl
is there no way to turn it off? cause I host 2 blogs in the +1 timezone and 2 in the -8 time zone and I'd really rather not change them to be the same nor wait 9 hours to post on the other blogs....
philringnalda
Turn it off? Well, since I think the number of people who will flood your blog from a single IP, rather than just using proxies, is vanishingly small, I'd just turn it off by deleting those sections of the code. But, you don't actually have to do that. The quickest fix I can come up with is to just make the throttle per-blog rather than per-installation. Two sections you need to find, in {your MT directory}/lib/MT/App/Comments.pm

CODE
   if (MT::Comment->count({ ip => $user_ip,
       created_on => [$from] },
     {range => {created_on => 1} }))


and

CODE
   my $count =  MT::Comment->count({ ip => $user_ip,
         created_on => [$from] },
       { range => {created_on => 1}});


In both cases, you want to add
CODE
blog_id => $entry->blog_id,
after the
CODE
ip => $user_ip,
so that you wind up with

CODE
   if (MT::Comment->count({ ip => $user_ip,
                            blog_id => $entry->blog_id,
       created_on => [$from] },
     {range => {created_on => 1} }))


and

CODE
   my $count =  MT::Comment->count({ ip => $user_ip,
                                     blog_id => $entry->blog_id,
         created_on => [$from] },
       { range => {created_on => 1}});


That way, you only look at comments in the last whenever on that blog, so you don't have to worry about timezone issues.

(And note that if you are using MT-Blacklist 1.63, you'll need to change those lines in MTBlPost.pm, not in Comments.pm, since Comments.pm isn't actually doing the work for you with MT-Blacklist installed.)
sugi_grl
wow philringnalda thanks very very much

but now I get this error:

QUOTE
An error occurred: syntax error at lib/MT/App/Comments.pm line 18, near "amp;" syntax error at lib/MT/App/Comments.pm line 22, near ")" Compilation failed in require at mt-comments.cgi line 21.


and still get it even tho I removed those bits of code

http://nanalog.com/blog/
http://nanalog.com/jendhi/
http://nanalog.com/seabiscuit/
oddsox
Not sure if this is a bug report, but I upgraded to 2.661 but when I looked at the mt.cfg I didn't see any ThrottleSeconds option? I ran a search incase I passed over it, and nada...
philringnalda
Syntax error line 18 - sounds like you used an HTML editor to edit Comments.pm, and it decided that it should convert the &s to & + amp;s, which is good in HTML but evil in Perl. Try again with a fresh copy from the upgrade archive, I'd say.

Upgrades don't replace mt.cfg, since they would overwrite your existing config, so for anything new you just have to add it yourself.
sugi_grl
you rock, philringnalda!
oddsox
DER huh.gif

Thanks philringnalda !!! ...apparently didn't have enough coffee this morning. wink.gif
smeg
The time zone issue could easily be my problem too, I have two blogs in GMT +0 and two in GMT -5, and to top it all off, my hosts server time is slightly out of whack, forcing me to turn my main GMT-5 blog to be GMT-6 temporarily.

I'll try using those code hacks to disable this "feature" when I have some time ...

Is this something that could be toggled in the GUI in future releases? I don't like the idea of running with modified code (and having to remember this if I move the blog or break something)
nammer
Phil does rock; it's nice to have written proof biggrin.gif
sugi_grl
phil's fix has been working for me all this time, now all of a sudden if I post on my hosted +8 blog I get throttled on my -1 time zone blog - any thoughts?

thanks so much!

http://nanalog.com/blog/ is the -1
http://nanalog.com/jendhi/ is one of the +8
spackletoe
A life saver! thank you!
imatt
To bring back an old thread...

I'm having this problem, however there's only one blog hosted on my MT install. Doesn't appear to help when I or the blog change timezones.
amjlawso
Me too, imatt. My install only hosts one blog. Ironically the person who is getting throttle responses is in the same timezone as the server and I are in. The person working in another timezone hasn't reported it. Fun times...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.