Closed Bug 567409 Opened 12 years ago Closed 12 years ago

SUMO is reporting "Too many connections"

Categories

(Infrastructure & Operations Graveyard :: WebOps: Other, task)

All
Other
task
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jsocol, Assigned: oremj)

Details

support.mozilla.com is throwing "too many connections" database errors in production over HTTPS (HTTP seems to be comfortably bouncing off Zeus for now).
Assignee: server-ops → jeremy.orem+bugs
databases are swamped with hundreds of
SELECT COUNT(*) AS count FROM tiki_comments a where a.`object`='1' and a.`objectType` = 'forum' and a.`commentDate` > 1273258041

with random dates on the end.

Looks like someone's scraping the forums if I had to guess.
Do you have some thoughts on what would be a good approach here? Looks like caching doesn't help?

I believe that query is fairly contained so we could temporarily patch the code. It would report the wrong number of pages however. Is there a better way?
Just had a thought - would it help if the date was fixed? We could easily do that, at least for today.
Blocked google bot. Should be getting better now.  Let me know if you want to patch that date.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
I pasted this over IRC: http://paulc.pastebin.mozilla.org/726684
It should help with the hits updates. Patched locally and didn't see any issues, so if the load is still too high and this would really help, go for it.
(In reply to comment #4)
> Blocked google bot. Should be getting better now.  Let me know if you want to
> patch that date.
I would rather not, unless you think it would help a lot. I have doubts that it would, since the count AFTER a date (be it fixed or not) will not be constant.
(In reply to comment #1)
> Looks like someone's scraping the forums if I had to guess.

I had Cheng turn off his sumobot scraping for the weekend. That should help, too.
[root@mradm02 support.mozilla.com]# curl -s 'http://paulc.pastebin.mozilla.org/?dl=726684' | patch -p0
(Stripping trailing CRs from patch.)
patching file webroot/lib/commentslib.php
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 1333 with fuzz 2.
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.