我有一個在谷歌應用引擎上運行的 Django 4.0 應用程式,并且在大多數情況下它運行良好。但是,我有一個特定的頁面,在我多次加載該頁面后,它似乎使應用程式崩潰。在我的筆記本電腦上,我看不到這種行為,所以我試圖除錯它在 GAE 上運行時出現的問題,但我對正在發生的事情沒有太多了解。看日志并沒有告訴我任何有趣的事情,只是工人正在關閉然后他們正在重新啟動:
gcloud app logs tail -s default
2022-01-26 16:02:38 default[fixeddev] 2022-01-26 08:02:38,933 common.views INFO Application started
2022-01-26 16:03:40 default[fixeddev] "GET /organization/clean_up_issues/ HTTP/1.1" 200
2022-01-26 16:03:56 default[fixeddev] "GET /organization/clean_up_issues/ HTTP/1.1" 200
2022-01-26 16:04:10 default[fixeddev] "GET /organization/clean_up_issues/ HTTP/1.1" 500
2022-01-26 16:04:15 default[fixeddev] [2022-01-26 16:04:15 0000] [12] [INFO] Handling signal: term
2022-01-26 16:04:15 default[fixeddev] [2022-01-26 08:04:15 -0800] [22] [INFO] Worker exiting (pid: 22)
2022-01-26 16:04:15 default[fixeddev] [2022-01-26 08:04:15 -0800] [25] [INFO] Worker exiting (pid: 25)
2022-01-26 16:04:15 default[fixeddev] [2022-01-26 08:04:15 -0800] [27] [INFO] Worker exiting (pid: 27)
2022-01-26 16:09:49 default[fixeddev] "GET /_ah/start HTTP/1.1" 200
2022-01-26 16:09:49 default[fixeddev] [2022-01-26 16:09:49 0000] [10] [INFO] Starting gunicorn 20.1.0
2022-01-26 16:09:49 default[fixeddev] [2022-01-26 16:09:49 0000] [10] [INFO] Listening at: http://0.0.0.0:8081 (10)
2022-01-26 16:09:49 default[fixeddev] [2022-01-26 16:09:49 0000] [10] [INFO] Using worker: gthread
2022-01-26 16:09:49 default[fixeddev] [2022-01-26 16:09:49 0000] [21] [INFO] Booting worker with pid: 21
2022-01-26 16:09:49 default[fixeddev] [2022-01-26 16:09:49 0000] [24] [INFO] Booting worker with pid: 24
2022-01-26 16:09:49 default[fixeddev] [2022-01-26 16:09:49 0000] [25] [INFO] Booting worker with pid: 25
2022-01-26 16:09:49 default[fixeddev] [2022-01-26 16:09:49 0000] [26] [INFO] Booting worker with pid: 26
2022-01-26 16:09:50 default[fixeddev] OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k
2022-01-26 16:09:50 default[fixeddev] OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k
2022-01-26 16:09:50 default[fixeddev] OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k
2022-01-26 16:09:50 default[fixeddev] OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k
2022-01-26 16:09:53 default[fixeddev] 2022-01-26 08:09:53,151 common.views INFO Application started
我該去哪里更深入地了解這些崩潰期間實際發生的情況?我對 GAE 比較陌生,感覺自己在除錯盲點,因為我無法在本地開發機器上重現此問題,并且沒有例外記錄。每次崩潰只會產生 500。
不相關的獎金回合問題:有人知道如何處理 OpenBLAS 警告嗎?這是一個真正的問題還是只是一個我似乎無法抑制的滋擾?
uj5u.com熱心網友回復:
應用程式引擎錯誤代碼 500(內部服務器錯誤),幾乎總是意味著您的 python 代碼引發了運行時捕獲的未經處理的例外。
轉到 App Engine 儀表板并查找錯誤 - 客戶端錯誤、服務器錯誤。
從您收到的錯誤訊息來看,您的應用使用的記憶體似乎超出了您的實體可以處理的記憶體。由于記憶體不足,這會導致錯誤。
你得到的唯一錯誤是:
2022-01-26 16:09:50 默認 [fixeddev] OpenBLAS 警告 - 無法確定此系統上的 L2 快取大小,假設為 256k
您的應用程式可能仍然可以運行。我建議您更改實體類以獲得更多可用記憶體并避免錯誤。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/423125.html
標籤:
