postgresql/operations.py @ 235 leaking memory

21 views
Skip to first unread message

Francesco Meli

unread,
Apr 1, 2020, 4:55:12 PM4/1/20
to Django users

Hello,

 

I have posted a well detailed issue here on StackOverflow (it can be improved if asked):https://stackoverflow.com/questions/60972577/django-postgres-memory-leak

 

  • I have a custom command that crunches jobs coming from a Postgresql table jobs.
  • Since the command is multi threaded the action of “picking up the job” (select oldest job with status ‘pending’ && setting status to ‘in progress’) was made atomic.
  • The jobs I’m executing for this test are empty methods so the leak can’t be there.
  • Using tracemalloc pip package, I tracked down the python file and line that is allocating memory without ever relasing it: postgresql/operations.py:222 (Django 2.0.0)
  • I also installed Django 3 thinking that could have been an old bug but even with this update the problem is still there: postgresql/operations.py:235 (Django 3.0.5)
  • Please help.

 

Thanks 

 

FM

Reply all
Reply to author
Forward
0 new messages