5

我使用 Azure Web Apps 服务部署了一个网站,该服务将主要用作 API。问题是 wfastcgi 经常抛出错误并且网站出现故障。问题是启动它需要一段时间,因为 API 是一个预测模型,它需要加载一些数据。

该站点在 Azure Web App python 扩展上运行(尝试了 3.6.4 和 3.5.4,都给出了相同的错误)。

用过的包:

click==6.7
Flask==1.0.2
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
Werkzeug==0.12.2
pandas==0.23.3
keras==2.2.0
scikit-learn==0.19.1
tensorflow==1.8.0

错误代码:

2018-10-02 16:20:59.497482: Unhandled exception in wfastcgi.py: Traceback (most recent call last):
  File "D:\home\python354x64\wfastcgi.py", line 774, in main
    record = read_fastcgi_record(fcgi_stream)
  File "D:\home\python354x64\wfastcgi.py", line 158, in read_fastcgi_record
    data = stream.read(8)     # read record
OSError: [Errno 22] Invalid argument
2018-10-02 16:20:59.513123: Running on_exit tasks
2018-10-02 16:20:59.513123: wfastcgi.py 3.0.0 closed

据我所知,这个命令出错了:

sys.stdin.detach().read(8)

有什么想法可能导致这种情况吗?谢谢!

4

0 回答 0