3👍
Most likely your application simply cannot handle the load, there are too many possible reasons.
The most obvious could be:
- Lack of resources (i.e CPU or RAM). I would recommend setting up the monitoring of baseline health metrics on the application under test side so you could see if there is enough headroom for your application and if errors or high response time or low throughput are caused by too high memory consumption or swapping. See How to Monitor Your Server Health & Performance During a JMeter Load Test article for details.
- Improper configuration. Inspect your
nginx.conf
file and see i.e. ifworker_rlimit_nofile
setting has high enough value. See Tuning NGINX for Performance for more information. Same applies to PostgreSQL database - Bad quality of your Django application (inefficient algorithms, large objects in memory, etc.) You might want to use Python profiling tools while load test is running to see the most memory/cpu intensive functions and look what can be done to optimize them.
Source:stackexchange.com