Project environment
- operating system: Ubuntu 16.04
- Server: Nginx 1.10.3, uWSGI 2.0.17
- Database: Mysql 5.7 (using Ali Cloud"s RDS)
- Python:3.5.2
- Django:2.0.3
- Xadmin:2.0.1
problem description
- I created N app, in the Django project, two of which are relatively large (the Mysql database stores 20W + data).
-  enters the background from Xadmin, and one of the projects keeps reporting an error of nginx:504 Gateway Time out. Later, the result is that the timeout period set by nginx for uWSGI is only 2s, which causes the data to time out before the query finishes.solution : timeout of uWSGI extended by Nginx  
-  Nginx  Xadmin
 40s2 
:
- Nginx : Nginx Nginx
- uWSGI : uWSGI uWSGI Djangopython3 manage.py runserver uWSGI
- :20W+ 20W+
- Django ORM : 2s ORM
- Django ORM Django uWSGI Django
- : uWSGI  CPU 100%  
to sum up: the possibility of a problem is a large amount of data or a problem with a Django project, but I don"t know where to start. If you have encountered this kind of problem or can provide a solution to the great god, please do not hesitate to comment, thank you!
