"POST /api/dataset/duration" causing lockups

We’re on version 0.22.2 running on AWS Elastic Beanstalk (with Postgres in RDS as the internal database). Metabase locks up regularly and stops responding, with most requests throwing ELB 5xx errors.

Metabase logs show tons of the the following requests during the lockups:

06-02 18:52:38 DEBUG metabase.middleware :: POST /api/dataset/duration 200 (10 mins) (3 DB calls)
06-02 18:52:38 DEBUG metabase.middleware :: POST /api/dataset/duration 200 (10 mins) (3 DB calls)

When loading large dashboards, we’ll see dozens of those requests in a row, and they all take around 10 minutes to complete. During this time, Metabase can’t serve any traffic.

As a temporary fix, I tweaked nginx to return a 404 error for the /api/dataset/duration endpoint. That seems to have stopped the lockups, and users have been able to use the app without a problem.

What do users lose when this endpoint is disabled as described above? Have others seen problems with this endpoint?

Thanks for any help you can offer!