yujinjcho / movie_recommendations

movie recommendations leveraging critic reviews
MIT License
0 stars 0 forks source link

Looking Queuing / background jobs #33

Closed yujinjcho closed 7 years ago

yujinjcho commented 7 years ago

https://realpython.com/blog/python/flask-by-example-implementing-a-redis-task-queue/ https://bigishdata.com/2016/12/15/running-python-background-jobs-with-heroku/

yujinjcho commented 7 years ago

@achiu8 so I figured out what was happening. Gunicorn was running four processes on a dyno. When I submit multiple requests, each process was getting a request and processing it at the same time. So If I sent three requests at the same time, each process was loading up everything at the same time causing the memory overload. If i set concurrency to 1, I don't get the memory overload anymore, but takes longer with simultaneous requests.