谷歌应用程序引擎Django应用程序间歇性崩溃,但日志文件没有告诉我为什么



我有一个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警告吗?这是一个真正的问题,还是一个我似乎无法抑制的麻烦?

应用程序引擎错误代码500(内部服务器错误(,几乎总是意味着您的python代码抛出了一个由运行时捕获的未处理的异常。

转到应用程序引擎面板,查找错误-客户端错误、服务器错误。

从您收到的错误消息来看,您的应用程序使用的内存似乎超过了实例所能处理的内存。这会由于内存不足而导致错误。

你得到的唯一错误是:

2022-01-26 16:09:50默认[fixeddev]OpenBLAS警告-无法确定该系统上的二级缓存大小,假设256k

您的应用程序可能仍然正常工作。我建议您更改实例类以获得更多可用内存并避免出现错误。

相关内容

最新更新