我使用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)
任何想法可能是什么原因造成的?谢谢!