cpan-testers / cpantesters-api

An API in to data held by CPAN Testers: Test reports and CPAN uploads
Other
4 stars 4 forks source link

Find what is causing the Metabase API to consume memory #26

Open preaction opened 6 years ago

preaction commented 6 years ago

The legacy Metabase API slowly consumes a lot of memory. This eventually causes processes to be killed by the Out-of-Memory Killer (and not always the process we want). We should find out what is causing this slow leak and stop it.

The most likely culprit is in the Metabase:: modules. None of the other Mojolicious applications have this problem, and they all use the same modules except for the Metabase:: modules which are only used by the cpantesters-legacy-metabase.

Fixing the Metabase modules themselves may not be the best solution: This is a legacy API kept for backwards compatibility until new clients start using the new API (http://api.cpantesters.org). If the Metabase modules are difficult to fix, we can excise them from the API and Schema modules in favor of direct manipulation of the serialized JSON structure.

These are difficult tasks, so be forewarned. This is not a crisis, as we are mitigating the problem in #25.