engineyard / ey-cookbooks-stable-v7

Other
6 stars 5 forks source link

Puma-legacy not properly controlling memory resource usage #219

Open dvalfre opened 1 year ago

dvalfre commented 1 year ago

The ey-puma_legacy recipe configures monit for watching over its processes and workers. But in doing so, it misses to calculate the memory usage of the whole process tree (main process + child workers). Due to Puma's own architecture, the child processes carry the brunt of the work, thus prone to use more memory, but still not checked by monit.

We want to extend the relevant check to use if total mem, so taking into account the resource usage of the entire process tree.

Alternatively, as an improvement, we would like the monit control file for ey-puma_legacy to be aligned with the best practices of the ey-unicorn one