2

I have gone through all the documentation provided for the running Django Application on app engine. I have a Django Application where I am using Vision and Storage clients and my app name is pvd. I have been constantly getting below errors in error logs.

A  [2017-03-30 22:08:07 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:7) 
A  [2017-03-30 22:08:07 +0000] [7] [INFO] Worker exiting (pid: 7) 
A  [2017-03-30 22:08:07 +0000] [9] [INFO] Booting worker with pid: 9 
A  [2017-03-30 22:12:35 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:9) 
A  [2017-03-30 22:12:35 +0000] [9] [INFO] Worker exiting (pid: 9) 
A  [2017-03-30 22:12:36 +0000] [11] [INFO] Booting worker with pid: 11 
A  [2017-03-30 22:13:03 +0000] [1] [INFO] Handling signal: term 
A  [2017-03-30 22:13:03 +0000] [7] [INFO] Worker exiting (pid: 7) 
A  [2017-03-30 22:13:03 +0000] [1] [INFO] Shutting down: Master*

Below is my app.yaml

runtime: python
env: flex
entrypoint: gunicorn -b :$PORT pythonvision.wsgi

runtime_config:
  python_version: 3

Below is my requirement.txt

Django==1.10.6
google-cloud-storage==0.23.1
google-cloud-vision==0.23.1
gunicorn==19.7.0

For deploying I am using:

gcloud app deploy

What am I doing wrong?

displayname
  • 317
  • 1
  • 5
  • 15

2 Answers2

1

Have you looked at this answer to someone else seeing gunicorn worker timeouts?

Community
  • 1
  • 1
E. Anderson
  • 3,405
  • 1
  • 16
  • 19
  • `Updating service [default]...failed. ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error: [2017-03-31 00:28:34 +0000] [1] [INFO] Starting gunicorn 19.7.0 [2017-03-31 00:28:34 +0000] [1] [INFO] Listening at: http://127.0.0.1:8000 (1) [1] [INFO] Using worker: sync [1] [INFO] Server is ready. Spawning workers [7] [INFO] Booting worker with pid: 7 [7] [INFO] Worker spawned (pid: 7) Failed to find application: 'pythonvision' [7] [INFO] Worker exiting (pid: 7) [INFO] Shutting down: Master [1] [INFO] Reason: App failed to load.` – displayname Mar 31 '17 at 00:49
  • Created new config.py In app.yaml: entrypoint: gunicorn -c config.py pythonvision:app `Updating service [default]...failed. ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error: [1] [INFO] Starting gunicorn 19.7.0 [1] [INFO] Listening at: http://127.0.0.1:8000 (1) [1] [INFO] Using worker: sync [1] [INFO] Server is ready. Spawning workers [7] [INFO] Booting worker with pid: 7 [7] [INFO] Worker spawned (pid: 7) Failed to find application: 'pythonvision' [7] [INFO] Worker exiting (pid: 7) [INFO] Shutting down: Master [1] [INFO] Reason: App failed to load.` – displayname Mar 31 '17 at 00:58
0

Update gunicorn command with a timeout that suits your needs.

E.g (60 seconds):

entrypoint: gunicorn --timeout 60 -b :$PORT pythonvision.wsgi

I believe the default is 30 seconds.

Eyal Levin
  • 16,271
  • 6
  • 66
  • 56