【问题标题】:How to handle ah/start with python GAE app?如何处理啊/从 python GAE 应用程序开始?
【发布时间】:2021-04-09 01:33:17
【问题描述】:

我不得不更改我的 GAE 应用上的缩放类型以处理长时间运行的请求。

但是现在应用程序已经停止响应,我看到的只有:

2021-04-09 01:22:59 default[20210409t011947]  "GET /_ah/start HTTP/1.1" 200
2021-04-09 01:22:59 default[20210409t011947]  "GET /_ah/start HTTP/1.1" 200
2021-04-09 01:23:00 default[20210409t011947]  "GET /_ah/start HTTP/1.1" 200
2021-04-09 01:23:00 default[20210409t011947]  "GET /_ah/start HTTP/1.1" 200

我了解I have to respond to this startup event with some type of 200 response 我正在这样做:

@app.route('/_ah/start')
def startup():
    '''app starting'''
    logging.info('handle _ah/start')
    return {
        'status': 'OK',
        'msg': 'boot'
    }

但是我从来没有看到那个端点实际上被调用了。相反,我只是得到日志,就像我没有回应它一样。

经过一番挖掘,我发现 this message 在谈论如何可能没有在实例之间切换流量并使用 --promote 进行切换但不起作用。

main.py 有一些日志记录应该在启动时出现,但我什么也没看到。

【问题讨论】:

  • 你能分享你的 app.yaml 吗?
  • 其已修复,tx。与代理的 URL 配置有关

标签: python google-app-engine google-cloud-platform


【解决方案1】:

原来有一个前端代理拦截了事件!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-12
    • 2021-01-05
    • 1970-01-01
    相关资源
    最近更新 更多