Welcome, Guest!!
follow us on... rss

Author Topic: DOS attack?  (Read 5668 times)

Matt

  • Newbie
  • *
  • Posts: 7
    • View Profile
DOS attack?
« on: September 08, 2011, 02:25:17 AM »
Hi,

I noticed today the botbuster service & site was unavailable, did you have some sort of dos attack?

This problem caused an issue on our site as the file_get_contents was failing, would adding a timout prevent this in the future should botscout go down again?

ie in BotScout.php replace:

$returned_data = file_get_contents($apiquery);

with

$ctx = stream_context_create(array( 'http' => array( 'timeout' => 1 ) ) );
$returned_data = file_get_contents($apiquery, 0, $ctx);

Mike

  • Administrator
  • Sr. Member
  • *****
  • Posts: 300
    • View Profile
Re: DOS attack?
« Reply #1 on: September 08, 2011, 05:29:31 AM »
We've been experiencing some very heavy loads recently, but I don't think it's a DOS attack. We moved to a server which appears to be underpowered, and are in the process of moving (again) to a more capable server.

You can try adding a timeout, but I'm not sure how much that will help. Might be worth a try, though.


Hi,

I noticed today the botbuster service & site was unavailable, did you have some sort of dos attack?

This problem caused an issue on our site as the file_get_contents was failing, would adding a timout prevent this in the future should botscout go down again?

ie in BotScout.php replace:

$returned_data = file_get_contents($apiquery);

with

$ctx = stream_context_create(array( 'http' => array( 'timeout' => 1 ) ) );
$returned_data = file_get_contents($apiquery, 0, $ctx);
« Last Edit: October 31, 2011, 02:55:19 PM by Mike »
Please don't PM me for assistance- post your questions in the forum where others can see them.

Matt

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: DOS attack?
« Reply #2 on: September 08, 2011, 12:56:08 PM »
OK, that might the case, I did note the site would work one minute, then fail with a 503 error the next.

I`ve added the change to a site using the bot check on a contact form, as it was otherwise resulting on very long delays on form submit, the change works fine, though I did set the timeout at 2 sec's.

The only problem with the timeout is, if it actions, no botcheck is done, but most bots still get caught by my other checks anyway

Mike

  • Administrator
  • Sr. Member
  • *****
  • Posts: 300
    • View Profile
Re: DOS attack?
« Reply #3 on: September 08, 2011, 01:17:39 PM »
OK, that might the case, I did note the site would work one minute, then fail with a 503 error the next.

We hope to have the new server available and the domain switched within a few days. That should resolve this issue. We may add a timeout to the standard code as well.
Please don't PM me for assistance- post your questions in the forum where others can see them.