[問題] Django 專案在 AWS 上運作得超慢

看板Python作者 (內湖流川楓)時間7年前 (2018/05/15 18:04), 7年前編輯推噓2(203)
留言5則, 3人參與, 7年前最新討論串1/1
各位大大好,我在 AWS 建置了一個 Django 專案,要走 https, 架設的方式就一般 ubuntu 上 NGINX + uWSGI + Django 的配置, 一開始都運作正常,但跑了一陣子後,會突然變得超慢一直 time out 在網路上查到一筆資料,看起來是一樣的問題 https://goo.gl/zg56KD 前面 trouble shooting 的部份大致都能看懂,唯獨最後一段解法看不懂 orz "In the development version I was using DummyCache. In the AWS version, I was using Django-elasticache. I changed the AWS version to DummyCache and the load time problem disappeared!" 請問... 這個 DummyCache 跟 Django-elasticache 是什麼設定呢? 我是用 AWS Lightsail 的服務,跟上述兩個東西有關嗎 @@a? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.227.30.252 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1526378689.A.7AA.html

05/15 18:11, 7年前 , 1F
應該沒有關係, 重開 nginx 或 uWSGI 會變快嗎?
05/15 18:11, 1F

05/15 18:11, 7年前 , 2F
會的話大概是memory leak
05/15 18:11, 2F
呣... 如果我不用 nginx/uWSGI,直接用 django manage.py runserver 執行起來是都挺正常的... ※ 編輯: archon (125.227.30.252), 05/15/2018 18:26:41

05/15 19:49, 7年前 , 3F
也許問題是在你的 uWSGI 設置
05/15 19:49, 3F

05/15 19:50, 7年前 , 4F
另外你有做動靜分離嗎? img,css 這些檔案交給 nginx 處理
05/15 19:50, 4F

05/15 22:22, 7年前 , 5F
django的webserver主要是開發用的吧
05/15 22:22, 5F
文章代碼(AID): #1Q-h31Ug (Python)
文章代碼(AID): #1Q-h31Ug (Python)