502 Bad Gateway or 403 Forbidden

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.

I have unblocked the IP above

@SteveBowen Thank you Steve :smile:

Hey there. I guess I am having the same issue. My IP is 35.187.71.89 but I am handling 429 status code though.

Does the same limit apply to endpoints that do not require authentication ? Would it be possible to unban the IP considering that we will lower our number of requests to stay within the rate limit.

Thanks

Just checked our monitors/logs and you IP address has only done
1143 accesses in the period 10:52-11:06.
There are no errors at all.
Not sure what you are asking here, as you do not seem to have any issues.

Thanks @MArkWilliams.

We were able to start making calls again and we have have reduced the number of calls we make so I guess we should be ok.

Have a good day.

Hi, I’m getting the same issue recently with the addition of:

“Access to XMLHttpRequest at ‘https://api.companieshouse.gov.uk/search/companies?q=Spind’ from origin ‘***’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

It was previously working fine. I’ve tried registering the application again to no avail.

My IP is: 88.208.244.67

Please let me know if I’ve posted in the wrong thread. Any help appreciated!

Thanks,
Dom

The 502 (Bad Gateway) status code indicates that the server while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. The “proxy server” is a system or router that acts as a gateway between your computer and the internet.

How to fix?

Perform a hard-refresh in your browser. On Macs, this is done by pressing Cmd + Shift + R.

If you are surfing the Web and see this problem for all Web sites you try to visit, then either 1) your ISP has a major equipment failure/overload or 2) there is something wrong with your internal Internet connection e.g. your firewall is not functioning correctly. In the first case, only your ISP can help you. In the second case, you need to fix whatever it is that is preventing you reaching the Internet.

This problem is due to poor IP communication between back-end computers, possibly including the Web server at the site you are trying to visit. Before analysing this problem, you should clear your browser cache completely.

Finally, restart your computer/networking equipment. Some temporary issues with your computer and how it’s connecting to your network could be causing 502 Bad gateway errors, especially if you’re seeing the error on more than one website. In these cases, a restart would help.