Targeted monitoring of database locks and high memory usage
Technical
Location: Track 1 - 10/29/21, 11:30 AM - 10/29/21, 12:00 PM (+0200) (30 minutes)

Targeted monitoring of database locks and high memory usage
Tom Blauwendraat Owner / Lead Developer  at Sunflower IT https://sunflowerweb.nl tom@sunflowerweb.nl +31-6-16798193

Lead developer at Sunflower IT, an Odoo integrator in the Netherlands.


Sometimes we are confronted with bad performance in Odoo and not sure where to look in the code. Older versions or custom code can cause database locking conflicts and memory issues. Profilers such as py-spy can be useful, but have to be fired at the exact right moment and at the right worker to give useful information.

We developed a set of non-intrusive scripts that can be applied on production servers and monitor for locks and high memory usage, then profile the situation. These scripts can be used to quickly point to the offending code, even when just stepping into a new project and dealing with a very large codebases that you are unfamiliar with.