502 Bad Gateway or 403 Forbidden

Dear CH community,

Since Friday every my API call from my server generates error 502 Bad Gateway or sometimes ERROR 403: Forbidden. The complete call for example company details is following:
[t*****@s18***** system]$ wget https://beta.companieshouse.gov.uk/search?q=06063954
–2018-02-21 10:47:20-- https://beta.companieshouse.gov.uk/search?q=06063954
Resolving beta.companieshouse.gov.uk… 54.194.180.90, 34.249.182.34, 52.210.92.132
Connecting to beta.companieshouse.gov.uk|54.194.180.90|:443… connected.
HTTP request sent, awaiting response… 403 Forbidden
2018-02-21 10:47:20 ERROR 403: Forbidden.

Could you please help with this. Thank you.

Additional I found last week that API did not return '429 too many requests error" but only 502 is returned.

I have messaged you asking for some details…

are you still experiencing problems?

You should receive mail with details you asked for.
I have sent to chs@companieshouse…

Hello Mark,

Do you have any information about problem I described.
THank you!

You are currently banned. You were banned around the 16th Feb, after communication from my colleague.
Please supply your originating IP address so I can unban you.

The ip is:
87dot106dot29dot218
Thank you.

I’m now experiencing the same issue, even just visiting the website version beta.companieshouse.gov.uk - I believe I made an error in code that didn’t take into account rate limiting, so I ran it in development once but now I can’t access anything.

The IP would most likely be 10dot51dot8dot249

Not sure this is the correct address as this address has not accessed our services in the last 7 days.

It seems it was a temporary glitch anyway. Two minutes later we were able to access the site again. However now we’ve got the 502 Bad Gateway again this morning on the company search API.

I have updated your other post regarding 502 errors

Hi @MArkWilliams I am getting 403 forbidden error when calling the company house api. Can you please help me regarding that.
My IP address is :35.178.22.35.

Thanks.

That IP is in the exclude list. This will either be a result of inappropriate use against the fair usage policy or unusual searching patterns that have been identified.

Steve

Hi @SteveBowen , what can be the workaround for that .
Thanks

Don’t exceed the rate limit, if you do exceed the rate limit you should code for the 429 error being returned and do not contravene the fair usage policy:

The Companies House searchable databases are designed to meet the needs of a wide range of users wishing to interrogate our information on-line.
Due to limitations of equipment and bandwidth, they are not intended to be a source for bulk downloads.
Individuals, companies, IP addresses or blocks of IP addresses who deny or degrade service to other users by generating unusually high numbers of daily database accesses, whether generated manually or in an automated fashion, may be denied access to these services without notice.

@SteveBowen Can you please unblock it for now. Will keep that in mind from now.

Thanks.

Looking through the history of blocked IP addresses it appears that you were performing high volume search requests. As you were exceeding the rate limit we were returning 429 errors but you were ignoring them.

Have you made any code changes to reduce the rate of query upon the 429 error being returned.

Steve

@SteveBowen Yes we have handled it now by making the required code changes. Earlier it was some code issue because of which it happened.
Please unblock it.

Thanks.

I am prepared to unblock you - however we will ban you again if you have failed to make the necessary changes.

Ok sure, please unblock , we have made necessary changes.

Thanks.