Google 云函数“[错误]:/ [POST] 出现异常”
Google Cloud Function "[ERROR]: Exception on / [POST]"
我有这个错误
[ERROR]: Exception on / [POST]
作为云函数 Log
选项卡中的最后一个条目,测试函数失败后:
Error: function terminated. Recommended action: inspect logs for termination reason. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging Details:
500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
怎么办?
只是分享这个,因为它让我感到惊讶。日志只需要几十秒就可以真正完成条目。就我而言,我在测试失败后直接去了Log
,然后在看到底部的日志条目错误后立即跳转到CF的Edit
,认为这一切都可以从中获益日志。
然后我改变了主意,回到 Log
选项卡,然后才看到真正的错误条目 [ERROR]: Exception on / [POST]
。
不重要,因为无论如何您都会遇到另一个错误:我使用的 create_engine()
函数没有所需的模块前缀 sqlalchemy.create_engine()
。 (旁注:除非您使用 VPC 连接器,否则在 CF 中查询您自己的数据库似乎无论如何都行不通,不要从这个示例中认为这可能是可能的).
我有这个错误
[ERROR]: Exception on / [POST]
作为云函数 Log
选项卡中的最后一个条目,测试函数失败后:
Error: function terminated. Recommended action: inspect logs for termination reason. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging Details: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
怎么办?
只是分享这个,因为它让我感到惊讶。日志只需要几十秒就可以真正完成条目。就我而言,我在测试失败后直接去了Log
,然后在看到底部的日志条目错误后立即跳转到CF的Edit
,认为这一切都可以从中获益日志。
然后我改变了主意,回到 Log
选项卡,然后才看到真正的错误条目 [ERROR]: Exception on / [POST]
。
不重要,因为无论如何您都会遇到另一个错误:我使用的 create_engine()
函数没有所需的模块前缀 sqlalchemy.create_engine()
。 (旁注:除非您使用 VPC 连接器,否则在 CF 中查询您自己的数据库似乎无论如何都行不通,不要从这个示例中认为这可能是可能的).