Closed elliottevans closed 3 months ago
@toddrob99 for viz
@elliottevans, does the error only happen when you use a large date range? It appears the API is returning a 500 Internal Server Error when its query times out. Postman won't show me the response size with the game(content(media(epg)))
included for all of 2019 because it says it's too big, but even without the game(content(media(epg)))
hydration, the response for all of 2019 is 20MB. For March 2019, the response is 2.63MB without the game(content(media(epg)))
hydration and 4.65MB with it. The response for the first half of 2019 is 46MB with the hydration included and 11MB without it.
I'm sure removing the hydration makes the query complete faster because it's joining fewer tables. However, removing the hydration would be a breaking change for anyone expecting the media data to be included.
Instead, I suggest reducing the date range in your requests so they can complete in a timely manner.
Updates:
schedule
function. As it stands, theschedule
function relies on ahydrate
parameter:However, usage shows that including
game(content(media(epg)))
in thehydrate
parameter creates unreliable behavior on calls to theschedule
function, often leading to internal server errors from MLB's API:The behavior appears to be stochastic, only occasionally resulting in a clean response from the MLB API.
However, removing
game(content(media(epg)))
entirely from thehydrate
parameter appears to fix this issue..idea
in.gitignore
. For those using pycharm IDE