Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Script needs major optimizing.

by i5513 (Monk)
on Dec 30, 2011 at 12:23 UTC ( #945628=note: print w/ replies, xml ) Need Help??


in reply to Script needs major optimizing.

That redirect could be done by modrewrite in apache, and run the script only if facebook user agent is used
So no every http request is generating a new process
Regards,


Comment on Re: Script needs major optimizing.
Re^2: Script needs major optimizing.
by Jesse Smith (Novice) on Dec 31, 2011 at 08:21 UTC
    Thanks. I didn't think of using mod_rewrite.

    Though it's not from getting a ton of real people clicks that generates the high server load and crashing it. I just posted a video link to the page, and then removed the link. It's as if the Facebook robot is doing a DOS attack on my server, then stops about five minutes later!!!!! The page has 180,242 likes.

    Looking at the logs, from the post and delete, in five minutes, Facebook hit the URL 153 times then finally stopped, with a special guest appearance from the Google bot!!! It's like there's an infinite loop some where in there!!!

    Then when I re-posted the video link and keep it, it looks like when it shows up in SSH --> top, it's just actual Facebook users clicking it that makes the script show up, and that does not crash the server or make the load go very high (at 2.81 right now)! It looks like it's the first post of a video that causes Facebook to crash the server.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://945628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-08-02 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (53 votes), past polls