I am using Moviepy to edit a video and insert text into it in my web application. The page takes 10 seconds to load, that is alright for my client. The issue is when i host my project to a server. Say i send 5 requests simultaneously to the server, and the server gives response to all these requests in 50 seconds. Not giving response in 10 seconds for each of these requests. Below given is the nginx configuration file and uwsgi configuration. I have tried to add more processes, threads. Added uwsgi_read_timeout. But none of that fixed the issue. I don't have this issue in my local system. Each response takes only 10 seconds. That is why i thought the issue is not with moviepy, issue is somewhere in nginx and or uwsgi.Can somebody help me to figure out what is the issue here ? I am on an amazon instance with Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz processor with 2 cores and 8GB RAM.
server {
listen 80;
error_log /home/ubuntu/error.log;
client_max_body_size 100M;
client_body_buffer_size 100M;
location /media {
alias /home/ubuntu/projectfolder/media;
proxy_max_temp_file_size 0;
uwsgi_read_timeout 300s;
}
location /static {
alias /home/ubuntu/projectfolder/static;
uwsgi_read_timeout 300s;
}
location / {
uwsgi_pass unix:///tmp/uwsgi.sock;
include uwsgi_params;
uwsgi_read_timeout 300s;
}
}
[uwsgi]
master = true
socket = /tmp/uwsgi.sock
chmod-socket = 666
chdir = /home/ubuntu/projectfolder
wsgi-file = /home/ubuntu/projectfolder/settingsfolder/wsgi.py
virtualenv = /home/ubuntu/venv
vacuum = true
enable-threads = true
daemonize= /home/ubuntu/uwsgi.log
processes = 12
threads = 12
stats = /tmp/statsock