AWS Beanstalk错误504 Python Flask应用程序超时

AWS Beanstalk错误504 Python Flask应用程序超时,python,amazon-web-services,flask,mod-wsgi,amazon-elastic-beanstalk,Python,Amazon Web Services,Flask,Mod Wsgi,Amazon Elastic Beanstalk,我正在尝试在AWS Bean上部署Python Flask应用程序。我在python方面有相当丰富的经验,但对部署完全陌生。我收到一个错误,上面写着“url响应HTTP 504的时间太长”。我的环境状况完全良好,我对实例的所有部署都没有显示任何错误,但我似乎遇到了这个504问题 错误如下所示: 错误日志如下所示: 访问日志: 这是我的密码: from flask import Flask, request from flask_restful import Resource, Api

我正在尝试在AWS Bean上部署Python Flask应用程序。我在python方面有相当丰富的经验,但对部署完全陌生。我收到一个错误,上面写着“url响应HTTP 504的时间太长”。我的环境状况完全良好,我对实例的所有部署都没有显示任何错误,但我似乎遇到了这个504问题

错误如下所示:

错误日志如下所示:

访问日志:

这是我的密码:

from flask import Flask, request
  from flask_restful import Resource, Api

  import firebase_admin

  # For connecting to firestore database and authentication
from firebase_admin import credentials, firestore

 # For Cross-Origin Http requests
 from flask_cors import CORS, cross_origin

 # For Data base Connectivity
 from firebase_admin import db

 from flask import jsonify

  application = app = Flask(__name__)
  api = Api(app)


 CORS(app)

 class Firebase_Data(Resource):

     def get(self):

         return self._getData()

        def _getData(self):

         # Setting up credentials to connect
    cred = credentials.Certificate(****)

    # Setting up secure connection to firestore Real time database

        Kokomo_app = firebase_admin.initialize_app(cred, {
        'projectId' : '****'
       })


      # Connecting to the firestore client
    db_ref = firestore.client()

      # Referring to a section of the data
    ref_inc = db_ref.collection(****)

      # Fetching all the records under that particular section and converting 
       them to list of dictionaries
    docs = list( ref_inc.get() )



     lat_long = []

     for doc in docs:

        data = doc.to_dict()

        lat_long.append(

              { 'Latitude:' : data['latitude'], 'Longitude' : 
              data['longitude'] } )


       return lat_long


    api.add_resource(Firebase_Data, '/Firebase_Data') # Route_1

   if __name__ == '__main__':
      app.run()   
我的要求文件:

aniso8601==4.0.1

CacheControl==0.12.5

cachetools==3.0.0

certifi==2018.10.15

chardet==3.0.4

Click==7.0

firebase-admin==2.13.0

Flask==1.0.2

Flask-Cors==3.0.7

Flask-RESTful==0.3.6

google-api-core==1.5.2

google-auth==1.6.1

google-cloud-core==0.28.1

google-cloud-firestore==0.30.0

google-cloud-storage==1.13.0

google-resumable-media==0.3.1

googleapis-common-protos==1.5.5

grpcio==1.16.1

idna==2.7

itsdangerous==1.1.0

Jinja2==2.10

MarkupSafe==1.1.0

msgpack==0.5.6

protobuf==3.6.1

pyasn1==0.4.4

pyasn1-modules==0.2.2

pytz==2018.7

requests==2.20.1

rsa==4.0

six==1.11.0

urllib3==1.24.1

Werkzeug==0.14.1
我检查了我的日志,我的需求文件中的每个依赖项包似乎都已正确安装,没有任何问题,我正在使用apache库,还安装了最新的mod_wsgi包。。。。我使用了一些AWS资源并增加了负载平衡器的超时时间,但没有解决这个问题

我见过许多与这些相关的堆栈溢出问题,但似乎没有找到一个完整或具体的答案。尽管如此,我还是创建了这个问题,因为我在空闲层中部署的尝试很少,所以我想让它们发挥作用。我非常感谢您提前投入的时间和努力

注意:请忽略此代码中的缩进。我错误地操纵了间距以适应代码块内部


谢谢

伙计们??有人读了吗