Humbedooh/clc

Server take too long to start and it make kubernetes kill the pod

Opened this issue · 0 comments

From a quick reading of the code, the server first parse and start threads for each repository:

https://github.com/Humbedooh/clc/blob/main/server/main.py#L57

It take a long time on our infra (around 3 minutes for 86 repositories), and as we are deploying on kubernetes, the pod is not seen as ready fast enough, so it get killed in a loop.

Could the init part be done in a asynchronous way in the background, and then listen right away ?
We are trying to work around the slow starting time by increasing timeout, but this is not a sustainable way (as it increase with each repository, as we are loading bigger and longer yaml files as time pass).

Also, I checked, we are already using the c++ loader, so that's not python slowness here.