The Django Debug Toolbar will give you visibility into what django is spending time on during slower requests.
-
Install the django debug toolbar
-
You can use the
debug_toolbar
branch to get the configurations customized for saleorubuntu@saleor:~$ cd ~/saleor ubuntu@saleor:~$ git checkout debug_toolbar ubuntu@saleor:~$ pip3 install -r requirements.txt
-
-
Configure uwsgi to allow your browser to use the debug toolbar
-
Find your IP (http://www.whatsmyip.org/)
-
Edit
/etc/uwsgi/vassals/saleor_uwsgi.ini
in sudo mode. -
Add this line to the bottom:
env = INTERNAL_IPS=<your IP here>
-
Restart uwsgi
sudo supervisorctl restart uwsgi
-
-
Open a browser to saleor and navigate the site. The django debug toolbar should appear as sidebar.
Full docs here
Note: Running the server in debug mode will result in reduced performance