Slow API responses for modules and module items (even when cached)

jbeast
Community Member

I'm having an issue with some API requests being very slow to respond. The requests are being made on course homepages.

The request in question is specifically for the modules and module items for the course. This requests take ~4-6 seconds each (see Network screenshot attached).

Interestingly, the responses don't even include any content, but instead return a 304 Not Modified (as a If-None-Matched header is sent along with the ETag).

This doesn't seem to occur on all courses. We also have another separate Canvas environment with the same content, where the responses come back quickly (< 500ms).

What reasons could there be that the Canvas API is taking such a long time to determine that the already cached version of the resource is okay to use and return the 304 Not Modified?

 

Labels (1)
0 Likes