capacity4dev / capacity4more

A Drupal 7 powered distribution providing a community platform to share knowledge.
10 stars 9 forks source link

CFD-229 : Deploy on ACC : a lot of RestFulFloodException #294

Closed zero2one closed 9 years ago

zero2one commented 9 years ago

I deployed yesterday the develop branch on the ACC environment.

There is something strange with Restful API module:

Could it be that Restful is doing to much, even when it is not needed at all? (I even got some Restful related errors during the migration).

This is the message I get:

RestfulFloodException: Rejected by ip flood control. inRestfulAuthenticationBasic->authenticate() 
(line 32 of/var/www/capacity4more-acc.dev.amplexor.com/capacity4more/capacity4more/modules/contrib/restful/plugins/authentication/RestfulAuthenticationBasic.class.php).

Is there a work around for this as it blocks the demo…

amitaibu commented 9 years ago

can you do a debug_backtrace() to see where it's coming from. Or send me a db dump so I can check locally.

amitaibu commented 9 years ago

_mysql_5_5_29__127_0_0_1_os_c4d_flood_and_skype

zero2one commented 9 years ago

c4m-to-many-requests

zero2one commented 9 years ago

See CFD-229

amitaibu commented 9 years ago

@zero2one I've looked into this, and it seems RESTful is supposed to work properly.

Can we have a quick session together like last time, to check the DEV server. I have a feeling the $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] are somehow populated.

zero2one commented 9 years ago

@amitaibu Sounds logical as the site is sitting behind a htaccess login…

The htaccess login is necessary to protect prying eyes and Search bots.

amitaibu commented 9 years ago

Indeed it's the .htaccess

So we should change the result plugins authentication type to be array('cookie') -- so it won't hit the basic auth

amitaibu commented 9 years ago

Actually I found a better solution - https://github.com/RESTful-Drupal/restful/pull/336

So on ACC we will need to drush vset restful_skip_basic_auth 1 and it won't use the basic auth.

zero2one commented 9 years ago

We should add this to:

amitaibu commented 9 years ago

I think it should be environment specific - as in the production site, you would potentiality want to allow basic auth

amitaibu commented 9 years ago

https://github.com/RESTful-Drupal/restful/pull/336 is now in.

zero2one commented 9 years ago

The drush command fixes the issue.