Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Script needs major optimizing.

by i5513 (Pilgrim)
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

Replies are listed 'Best First'.
Re^2: Script needs major optimizing.
by Jesse Smith (Acolyte) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://945628]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-02-24 22:24 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (311 votes). Check out past polls.