我有一个烧瓶应用程序,它在我的本地系统上运行正常。它有与tensorflow后端的keras,它在python 3.6上运行。
当我将代码推送到heroku时。它开始下载这个文件,这个文件从未在我的本地系统上发生,并且崩溃了。:
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5
我猜它是内存/超时错误。我正在使用免费的heroku帐户。
如何才能让它在heroku上运行?
错误日志:
Starting process with command `gunicorn app:app --timeout 300`
[INFO] Starting gunicorn 19.7.1
[2017-10-09 14:04:25 +0000] [4] [INFO] Listening at: http://0.0.0.0:50169 (4)
2017-10-09T14:04:25.367668+00:00 app[web.1]: [2017-10-09 14:04:25 +0000] [4] [INFO] Using worker: sync
2017-10-09T14:04:25.372148+00:00 app[web.1]: [2017-10-09 14:04:25 +0000] [8] [INFO] Booting worker with pid: 8
2017-10-09T14:04:25.479248+00:00 app[web.1]: [2017-10-09 14:04:25 +0000] [16] [INFO] Booting worker with pid: 16
2017-10-09T14:04:26.136655+00:00 heroku[web.1]: State changed from starting to up
2017-10-09T14:04:26.745551+00:00 app[web.1]: Using TensorFlow backend.
2017-10-09T14:04:26.749705+00:00 app[web.1]: Using TensorFlow backend.
2017-10-09T14:04:50.593444+00:00 app[web.1]: Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5
2017-10-09T14:04:50.660642+00:00 app[web.1]: Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5
2017-10-09T14:04:57.914283+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=example.herokuapp.com request_id=b2aeff63-6d72-48e3-a2be-1d3e2344752b fwd="103.224.37.6" dyno=web.1 connect=1ms service=30001ms status=503 bytes=0 protocol=https
2017-10-09T14:05:30.595619+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=example.herokuapp.com request_id=af073356-f635-46fe-90bd-8527ef13092b fwd="103.224.37.6" dyno=web.1 connect=3ms service=30000ms status=503 bytes=0 protocol=https
2017-10-09T14:05:31.976163+00:00 app[web.1]:
2017-10-09T14:05:31.976163+00:00 app[web.1]: ...........................] - ETA: 24s
2017-10-09T14:05:31.976163+00:00 app[web.1]:
==>..........................] - ETA: 27s
2017-10-09T14:05:31.976163+00:00 app[web.1]: =====>........................] - ETA: 22s109109248/553467096 [====>.........................] - ETA: 27s
2017-10-09T14:05:31.976163+00:00 app[web.1]: - ETA: 21s
......] - ETA: 22s
2017-10-09T14:05:31.976163+00:00 app[web.1]: [=========>....................] - ETA: 22s
2017-10-09T14:05:31.976163+00:00 app[web.1]:
096 [===========>..................] - ETA: 21s
2017-10-09T14:05:31.976163+00:00 app[web.1]:
............] - ETA: 15s
2017-10-09T14:05:31.976163+00:00 app[web.1]: ....] - ETA: 14s
>.............] - ETA: 13s
2017-10-09T14:05:31.976163+00:00 app[web.1]: 67096 [==================>...........] - ETA: 11s
2017-10-09T14:05:31.976163+00:00 app[web.1]:
..] - ETA: 12s
.......] - ETA: 10s
2017-10-09T14:05:31.976163+00:00 app[web.1]: ====>.......] - ETA: 6s
=====>.....] - ETA: 4s
2017-10-09T14:05:31.976163+00:00 app[web.1]: ============>.......] - ETA: 7s
2017-10-09T14:05:31.976163+00:00 app[web.1]: =================>..] - ETA: 1s
tions.
2017-10-09T14:05:31.976186+00:00 app[web.1]: 2017-10-09 14:05:31.976043: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:05:31.976187+00:00 app[web.1]: 2017-10-09 14:05:31.976055: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:05:32.031285+00:00 app[web.1]: 2017-10-09 14:05:32.031191: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:05:32.031292+00:00 app[web.1]: 2017-10-09 14:05:32.031257: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:05:32.031293+00:00 app[web.1]: 2017-10-09 14:05:32.031276: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:05:32.443446+00:00 app[web.1]: [2017-10-09 14:05:32 +0000] [58] [INFO] Booting worker with pid: 58
2017-10-09T14:05:32.991979+00:00 app[web.1]: Using TensorFlow backend.
2017-10-09T14:05:35.819169+00:00 heroku[web.1]: Process running mem=908M(177.5%)
2017-10-09T14:05:35.819247+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-10-09T14:05:48.065459+00:00 app[web.1]: [2017-10-09 14:05:48 +0000] [67] [INFO] Booting worker with pid: 67
2017-10-09T14:05:48.130754+00:00 app[web.1]: [2017-10-09 14:05:48 +0000] [68] [INFO] Booting worker with pid: 68
2017-10-09T14:05:48.499120+00:00 app[web.1]: Using TensorFlow backend.
2017-10-09T14:05:48.528333+00:00 app[web.1]: Using TensorFlow backend.
2017-10-09T14:06:12.730309+00:00 app[web.1]: 2017-10-09 14:06:12.730203: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:12.730319+00:00 app[web.1]: 2017-10-09 14:06:12.730287: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:12.730340+00:00 app[web.1]: 2017-10-09 14:06:12.730308: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:12.745697+00:00 app[web.1]: 2017-10-09 14:06:12.745605: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:12.745703+00:00 app[web.1]: 2017-10-09 14:06:12.745674: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:12.745704+00:00 app[web.1]: 2017-10-09 14:06:12.745686: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:13.221496+00:00 app[web.1]: [2017-10-09 14:06:13 +0000] [117] [INFO] Booting worker with pid: 117
2017-10-09T14:06:15.851825+00:00 heroku[web.1]: Process running mem=912M(178.3%)
2017-10-09T14:06:15.851966+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-10-09T14:06:17.618828+00:00 app[web.1]: Using TensorFlow backend.
2017-10-09T14:06:24.973806+00:00 app[web.1]: [2017-10-09 14:06:24 +0000] [126] [INFO] Booting worker with pid: 126
2017-10-09T14:06:25.464279+00:00 app[web.1]: Using TensorFlow backend.
2017-10-09T14:06:55.977804+00:00 app[web.1]: 2017-10-09 14:06:55.977280: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:55.977817+00:00 app[web.1]: 2017-10-09 14:06:55.977783: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:55.977833+00:00 app[web.1]: 2017-10-09 14:06:55.977807: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09T14:06:56.343185+00:00 heroku[web.1]: Process running mem=1111M(217.1%)
2017-10-09T14:06:56.343268+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded)
2017-10-09T14:06:56.343377+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-10-09T14:06:56.778935+00:00 heroku[web.1]: State changed from up to crashed
2017-10-09T14:06:56.763085+00:00 heroku[web.1]: Process exited with status 137