1.django+uwsgi+nginx management platform, which used to work in a single thread. Later, a function was added to query and modify the password of the host in the ip list in batch. When updating, the site will not respond until the execution is finished because of a single thread.
2. The number of virtual machines and cores is 2. I have both set the process to 4 and the thread has not set
3 to 2. Nginx and uwsgi. Then came the problem of session emptying and jumping back to the login interface soon after the site was logged in. There is no error in the log, but it is found that the session recording the login status is empty, so it is thought that the login timeout has been skipped.
this is my uwsgi configuration
[uwsgi]
chdir=xx
module=xx
socket=xx
master=True
workers=4
pidfile=xx
vacuum=True
max-requests=5000
daemonize=xx
async=30
ugreen=""
http-timeout=300
the previous configuration only did not have a workers line, so it was a single process. After adding workers=4, log in to the website to execute the function for a long time, and there is a corresponding for others to visit the website, that is, session will always be cleared within one minute. Why
?