[#145] Getting 503 and Timeout issues from API

Migrated from Redmine #145 | Author: Egor Timofeev
Status: Rejected | Priority: Immediate, there is BUG! | Created: 2018-04-05


Hello,

Just did few queries (time is CEST):
2018-04-05 14:24:04: call [2] [getStartTimeMatrix]
2018-04-05 14:24:04: call [3] [getStartTimeMatrix]
2018-04-05 14:24:04: call [4] [getStartTimeMatrix]
2018-04-05 14:24:04: call [5] [getStartTimeMatrix]
2018-04-05 14:24:04: call [6] [getStartTimeMatrix]
2018-04-05 14:24:05: call [7] [getStartTimeMatrix]
2018-04-05 14:24:05: call [8] [getStartTimeMatrix]
2018-04-05 14:24:05: call [9] [getStartTimeMatrix]
2018-04-05 14:24:05: call [10] [getStartTimeMatrix]
2018-04-05 14:24:06: call [11] [getStartTimeMatrix]
2018-04-05 14:24:06: call [12] [getStartTimeMatrix]
2018-04-05 14:24:06: call [13] [getStartTimeMatrix]
2018-04-05 14:24:06: call [14] [getStartTimeMatrix]
2018-04-05 14:24:06: call [15] [getStartTimeMatrix]
2018-04-05 14:24:07: call [16] [getStartTimeMatrix]
2018-04-05 14:24:07: call [17] [getStartTimeMatrix]

Parameters for calls above:
“eventId”:“30”
“from”:“2018-02-11”
“to”:“2018-02-17”
and each call is done for single unit from list below.
“unit_id”: 2,3,5,6,9,14,15,16,17,18,20,24,25,26,27,28

And following requests have died with socket timeout.
SB request [8]. Timeout
SB request [10]. Timeout
SB request [14]. Timeout
SB request [9]. Timeout
SB request [11]. Timeout

Can you please explain why this is happening?
Same way from time to time I’m getting 503 responses from your server which you may also find in your log files.

We rely on your APIs for our customers to book courses and lessons with our driving school. When your APIs don’t work or your servers are not responding, we lose real customers and have increased customer support phone calls. What can we do to ensure our connection to your APIs always works or that we will have advance knowledge when a Simplybook API might not work in the future?

Redmine Admin wrote:

We have DDoS protection enabled on our servers. You should NOT call such method many times per second.
IF you need this limits to be removed, please contact our Live help and ask about enterprise version.

Egor Timofeev wrote:

Thank you. May be you can give some advices how can we get rid of that problem while we are discussing enterprice account?

Redmine Admin wrote:

It seems you should cache results of this on your side and call this method when something changed. E.g. you can call it for some unit_id on certain date if you got API callback call with new booking.

You can also pass array of unti_ids into this function Company public service methods - Company public service methods - SimplyBook.me