[#1386] URGENT !! BUSINESS CRITICAL

Migrated from Redmine #1386 | Author: Valentin Bert
Status: Feedback | Priority: Immediate, there is BUG! | Created: 2025-02-26


Hello,
I have some random 502 bad gateway.
We don’t understand why the API is down randomly.
Perhaps the 30 second rate limit ?
Can you investigate urgently ?
What are the solutions ?

{“url”:“https://user-api.simplybook.it/admin",“method”:“POST”,“data”:{“jsonrpc”:“2.0”,“method”:“book”,“params”:[“5”,“3”,“644”,“2025-03-18”,“09:30:00”,“2025-03-18”,“13:00:00”,“”,“”,“1”,“15317”],“id”:7},“headers”:[{“key”:“X-Company-Login”,“value”:“Alphadogshouse”},{“key”:“X-User-Token”,“value”:“636b1bb1c63640b22da9bd992f91c662ec5ed9a5b0dab97a305cdf6fb5602bbf”}],"useRawBody”:true}

Dmytro Bondarev wrote:

Please provide raw http request and response.
How many parallel requests are you making?

Valentin Bert wrote:

Dmytro Bondarev wrote in #note-1:

Please provide raw http request and response.
How many parallel requests are you making?

We need to add bookings to a batch (the client adds some days to a “cart” and then, we loop on each booking with the book method.
So it can be 1 or 40 items in the booking. We just delayed 2 seconds between each call to be sure the rate limit is not hit.

This is the 12th call in a loop of 20 that went on error :
{“url”:“https://user-api.simplybook.it/admin",“method”:“POST”,“data”:{“jsonrpc”:“2.0”,“method”:“book”,“params”:[“5”,“3”,“644”,“2025-03-18”,“09:30:00”,“2025-03-18”,“13:00:00”,“”,“”,“1”,“15317”],“id”:7},“headers”:[{“key”:“X-Company-Login”,“value”:“Alphadogshouse”},{“key”:“X-User-Token”,“value”:“636b1bb1c63640b22da9bd992f91c662ec5ed9a5b0dab97a305cdf6fb5602bbf”}],"useRawBody”:true}

And this is the answer : 502 bad gateway

could we add booking to a batch with a single call instead of looping ?

Dmytro Bondarev wrote:

You definitely meet the rate limit.
It seems that your delay is not working properly. Please double check it.

Valentin Bert wrote:

Dmytro Bondarev wrote in #note-4:

You definitely meet the rate limit.
It seems that your delay is not working properly. Please double check it.

The time delay is working perfectly. I have a console Log showing it.

What are the rate limit per seconds? per minute ? per hour ?

We need the batch add bookings, is there another way to do it in one call instead of looping ?

Redmine Admin wrote:

if you can share server IP with us then we would be able to check how many requests per second you are doing

Valentin Bert wrote:

Redmine Admin wrote in #note-6:

if you can share server IP with us then we would be able to check how many requests per second you are doing

I can’t share you the server IP, but I can share you the company login ?

Redmine Admin wrote:

there is no way to check this without your IP. You can securely share it with our live help (just give them link to this ticket and ask to provide IP to developers)

Valentin Bert wrote:

Redmine Admin wrote in #note-8:

there is no way to check this without your IP. You can securely share it with our live help (just give them link to this ticket and ask to provide IP to developers)

IP Address
80.215.13.2

Redmine Admin wrote:

there is only one request from this IP made very recently, it doesn’t look like your requests are coming from this IP

Valentin Bert wrote:

Redmine Admin wrote in #note-10:

there is only one request from this IP made very recently, it doesn’t look like your requests are coming from this IP

Would you be available for a quick meeting ? it will be easier

Redmine Admin wrote:

Please provide IP of your server from which you are doing requests if you believe there is something wrong with the rate limiting. If you found the issue on your side then we may consider this ticket closed

Valentin Bert wrote:

Redmine Admin wrote in #note-12:

Please provide IP of your server from which you are doing requests if you believe there is something wrong with the rate limiting. If you found the issue on your side then we may consider this ticket closed

The ip
3.232.205.18

Redmine Admin wrote:

here is example of one of the spikes generated by this IP, it got blocked due to the rate limit

Feb 26, 2025 @ 22:27:00
Feb 26, 2025 @ 22:27:00
Feb 26, 2025 @ 22:26:57
Feb 26, 2025 @ 22:26:57
Feb 26, 2025 @ 22:26:55
Feb 26, 2025 @ 22:26:55
Feb 26, 2025 @ 22:26:52
Feb 26, 2025 @ 22:26:52
Feb 26, 2025 @ 22:26:49
Feb 26, 2025 @ 22:26:49
Feb 26, 2025 @ 22:26:46
Feb 26, 2025 @ 22:26:46
Feb 26, 2025 @ 22:26:44
Feb 26, 2025 @ 22:26:44
Feb 26, 2025 @ 22:26:40
Feb 26, 2025 @ 22:26:40
Feb 26, 2025 @ 22:26:38
Feb 26, 2025 @ 22:26:38
Feb 26, 2025 @ 22:26:35
Feb 26, 2025 @ 22:26:35
Feb 26, 2025 @ 22:26:32
Feb 26, 2025 @ 22:26:32
Feb 26, 2025 @ 22:26:29
Feb 26, 2025 @ 22:26:29
Feb 26, 2025 @ 22:26:26
Feb 26, 2025 @ 22:26:26
Feb 26, 2025 @ 22:26:24
Feb 26, 2025 @ 22:26:24
Feb 26, 2025 @ 22:26:21
Feb 26, 2025 @ 22:26:21
Feb 26, 2025 @ 22:26:14
Feb 26, 2025 @ 22:26:14
Feb 26, 2025 @ 22:26:14
Feb 26, 2025 @ 22:26:14
Feb 26, 2025 @ 22:26:11
Feb 26, 2025 @ 22:26:11
Feb 26, 2025 @ 22:26:11
Feb 26, 2025 @ 22:26:11
Feb 26, 2025 @ 22:26:04
Feb 26, 2025 @ 22:26:04

Redmine Admin wrote:

sorry, it was NOT blocked. All responses are 200

Redmine Admin wrote:

there are no non 200 response for this IP for the last days. This can mean 2 things: you have another IP and/or the problem is not on our side

Valentin Bert wrote:

Redmine Admin wrote in #note-16:

there are no non 200 response for this IP for the last days. This can mean 2 things: you have another IP and/or the problem is not on our side

We have 502 Gateway errors :confused:

Here is screen shot of a 502 error just got 5 minutes ago

Redmine Admin wrote:

please provide raw http request, http response, ip and time for such request to check

Valentin Bert wrote:

Redmine Admin wrote in #note-18:

please provide raw http request, http response, ip and time for such request to check

A new one just now : same IP : 3.232.205.18

Valentin Bert wrote:

Valentin Bert wrote in #note-19:

Redmine Admin wrote in #note-18:

please provide raw http request, http response, ip and time for such request to check

A new one just now : same IP : 3.232.205.18

I send the request as attahcment, but i can’t see it once sent.