Too many open files
In the testing suite issue https://earth.bsc.es/gitlab/es/testing_suite/-/issues/50, they reported that the API is getting errors randomly related to the number of open files by the API.
I've reviewed the code at it seems that is possible this is happening because in many parts of the source code the database connection is opening but never closing, especially in really old modules.
Already checked how many open files are used by the admin user in production at ES and it is quite high (~1200 open files).