Yeah even with 20 seconds, your code from pastebin doesn’t look and see if a previous request is still running.
So you either have multiple requests crashing into each other, or getting hits on different servers in the API pool and having a caching. But it’s more likely the former.
If you are doing one per 20 seconds then you ajax call could be extended to terminate after 15 seconds if it takes too long to run.