JackHaK / TMF

0 stars 0 forks source link

Course Attachments API EndPoint - 429 Too Many Requests #25

Open seanthepottingshed opened 6 years ago

seanthepottingshed commented 6 years ago

@JackHaK @PeteHaK

When requesting attachments per a course, the following 429 error is thrown:

Client error: `GET http://gtadev.humbleandkind.co.uk/api/courses/247/attachments` resulted in a `429 Too Many Requests` response:
  Too Many Attempts.

Is there throttling on this particular end point?

JazHaK commented 6 years ago

There is no throttling ony DOS - can you keep an eye on it and let us know if this keeps happening

seanthepottingshed commented 6 years ago

@JazHaK

Just a wild stab in the dark here - is this not be due to Laravel's default throttling?

seanthepottingshed commented 6 years ago

@JazHaK @JackHaK

Yep, I'm pretty sure it's Laravel's default throttling as it throws the error on 60 requests.

JazHaK commented 6 years ago

I've upped the default throttle to 600 requests a minute - let me know if that isn't enough.

seanthepottingshed commented 6 years ago

@JazHaK

Thanks all works now - really appreciated.

The throttle will always needs to be higher than the total number of courses as I have to call the attachments API endpoint once per a course ;)

JazHaK commented 6 years ago

we can add the attachments array to the Course blob no problem - however we still need to agree how you want to get courses/events

seanthepottingshed commented 6 years ago

Cheers @JazHaK!

@joshgosselin Any thoughts on @JazHaK comment above about getting courses/events?

seanthepottingshed commented 6 years ago

@JazHaK

If you could add the attachments array to the course in the Courses API endpoint that would be marvellous. After discussions with @joshgosselin we can't think of any use cases where we would need to access the attachments without a course.

seanthepottingshed commented 6 years ago

@JazHaK

Have you had any joy with the above?

seanthepottingshed commented 6 years ago

@JazHaK

Have you had any joy with the above?