Setting environment variable LD_PRELOAD with the aim of loading jemalloc instead of default CPU allocator solved the problem.
My launch is as follows:
LD_PRELOAD=./libjemalloc.so.1 python3 app.py.
Related links:

Related problem 75
Decreasing RAM Usage by 40% Using jemalloc with Python & Celery 92