prismicio-community/ruby-kit

Net::OpenTimeout (execution expired) errors when trying to access the API

Closed this issue · 1 comments

Since 2021-05-20 I've been getting a bunch of timeouts Net::OpenTimeout (execution expired) when using this gem to access the Prismic API. These happen sporadically but frequently. I cannot reliably reproduce them, but I can reproduce them by just refreshing pages that rely on the Prismic API enough times.

The traceback on the error points to my init_api method which is simply:

def init_api
  Prismic.api(ENV['PRISMIC_URL'], ENV['PRISMIC_ACCESS_TOKEN'])
end

Most of the time this works fine but regularly it will fail. There is nothing in the Prismic status dashboard to indicate an issue with the API endpoint.

You can test this by going to https://www.littlefutures.org/blog and refreshing a bunch of times or trying to click into the various blog posts. Eventually one of them will timeout and 500.

Now, yes I should be handling these exceptions, but also, this never happened before 2021-05-20, I haven't changed any code on or around then. So I'm wondering what is going on. Any ideas?

NB. These errors stopped on 2021-05-28 🤷‍♂️