Reputation: 77
I am running a project with django + nginx + uwsgi and my uwsgi.ini file confiuration is as follows:
socket = /tmp/uwsgi.sock
chmod-socket = 666
socket-timeout = 60
enable-threads = true
threads = 500
disable-logging=True
with the above configuration also added harakiri = 60 but unable to free memory then tried addition of max-request = 100 and max-worker-lifetime = 30 but memory was not freed after this tried configuring process=4 and threads =2 but also unable to free memory usage. while analysing my api calls I found three bulk api which increased memroy usage continuously and optimized the code. Eventhough after code optimizing and adding some parameters to uwsgi.ini file unabke to free memory. Please help me out to fix this issue.
Upvotes: 1
Views: 3900
Reputation: 1857
I've faced a similar issue when working with Django + Uwsgi application, this is my uwsgi.ini coniguration :
[uwsgi]
enable-threads = true
threads = 100
harakiri = 30
max-request = 50
After doing these figure out which request causes huge data query results from database and if possible optimize them.
Let me know if this works :), also a little more information would help figure out better solution.
Upvotes: 4