部署到Google Cloud Platform时遇到问题

时间:2020-05-09 05:59:18

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

我已经使用1'b0从conda环境中成功地在本地部署了应用程序,但是当我尝试使用uvicorn main:app部署到Google Cloud Platform时,出现了一个错误,我发现很难调试。这就是我要得到的

gcloud app deploy app.yaml

app.yaml

    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 228, in run
    super().run()
  File "/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 229, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 342, in halt
  0%|          | 0/6892 [00:00<?, ?it/s]Skipping token 2519370 with 1-dimensional vector ['300']; likely a header
    self.stop()
 39%|███▉      | 1225/3132 [00:00<00:00, 2785.15it/s]  File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
    time.sleep(0.1)
  File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
    self.reap_workers()
  File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
  0%|          | 0/7657 [00:00<?, ?it/s]Skipping token 2519370 with 1-dimensional vector ['300']; likely a header
 56%|█████▌    | 1711/3045 [00:00<00:00, 3331.80it/s]:35, 705kB/s]

requirements.txt

runtime: python
env: flex
runtime_config:
    python_version: 3
resources:
  cpu: 12
  memory_gb: 72
  disk_size_gb: 60
instance_class: F4_1G
entrypoint: gunicorn main:app -w 24 -k uvicorn.workers.UvicornWorker

0 个答案:

没有答案