Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在IBM CloudFoundry中部署Flask应用程序时出现退出状态137(内存不足)错误_Python_Github_Flask_Ibm Cloud - Fatal编程技术网

Python 在IBM CloudFoundry中部署Flask应用程序时出现退出状态137(内存不足)错误

Python 在IBM CloudFoundry中部署Flask应用程序时出现退出状态137(内存不足)错误,python,github,flask,ibm-cloud,Python,Github,Flask,Ibm Cloud,我部署了Flask应用程序,但收到一条不成功的启动消息。以下是错误日志: Invoking 'cf logs churn_predictor_mody --recent'... Retrieving logs for app churn_predictor_mody in org smishrav2@gmail.com / space dev as smishrav2@gmail.com... 2020-05-04T19:33:05.06+0530 [STG/0] OUT

我部署了Flask应用程序,但收到一条不成功的启动消息。以下是错误日志:

Invoking 'cf logs churn_predictor_mody --recent'...

Retrieving logs for app churn_predictor_mody in org smishrav2@gmail.com / space dev as smishrav2@gmail.com...

   2020-05-04T19:33:05.06+0530 [STG/0] OUT            Running setup.py install for pandas: still running...
   2020-05-04T19:34:07.05+0530 [STG/0] OUT            Running setup.py install for pandas: still running...
   2020-05-04T19:35:07.11+0530 [STG/0] OUT            Running setup.py install for pandas: still running...
   2020-05-04T19:36:13.97+0530 [STG/0] OUT            Running setup.py install for pandas: still running...
   2020-05-04T19:37:06.61+0530 [STG/0] OUT            Running setup.py install for pandas: finished with status 'done'
   2020-05-04T19:37:15.06+0530 [STG/0] OUT        Successfully installed Flask-1.1.2 Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 cycler-0.10.0 itsdangerous-1.1.0 joblib-0.14.1 kiwisolver-1.2.0 matplotlib-2.2.2 numpy-1.14.3 pandas-0.23.0 pyparsing-2.4.7 python-dateutil-2.8.1 pytz-2020.1 scikit-learn-0.22.2 scipy-1.4.1 six-1.14.0
   2020-05-04T19:37:15.51+0530 [STG/0] ERR        WARNING: You are using pip version 19.2.3, however version 20.1 is available.
   2020-05-04T19:37:15.52+0530 [STG/0] ERR        You should consider upgrading via the 'pip install --upgrade pip' command.
   2020-05-04T19:37:51.74+0530 [STG/0] OUT Exit status 0
   2020-05-04T19:37:51.74+0530 [STG/0] OUT Uploading droplet, build artifacts cache...
   2020-05-04T19:37:51.74+0530 [STG/0] OUT Uploading droplet...
   2020-05-04T19:37:51.74+0530 [STG/0] OUT Uploading build artifacts cache...
   2020-05-04T19:37:54.30+0530 [API/23] OUT Creating droplet for app with guid f29f90c2-ffb4-484d-ba8c-0fa55ceeafe9
   2020-05-04T19:37:54.75+0530 [STG/0] OUT Uploaded build artifacts cache (112.8M)
   2020-05-04T19:38:02.02+0530 [STG/0] OUT Uploaded droplet (142.4M)
   2020-05-04T19:38:02.06+0530 [STG/0] OUT Uploading complete
   2020-05-04T19:38:02.35+0530 [STG/0] OUT Cell 69a6d7ce-7f16-4a8f-8cbe-9e4163ccc12b stopping instance ccd63041-fc2e-4cc0-8b35-55d25948d538
   2020-05-04T19:38:02.35+0530 [STG/0] OUT Cell 69a6d7ce-7f16-4a8f-8cbe-9e4163ccc12b destroying container for instance ccd63041-fc2e-4cc0-8b35-55d25948d538
   2020-05-04T19:38:03.05+0530 [CELL/0] OUT Cell 40a05280-064a-408d-abe4-a6db0e5f8a9c creating container for instance 0b7cd2f2-1cb6-4e83-5041-50b5
   2020-05-04T19:38:04.11+0530 [STG/0] OUT Cell 69a6d7ce-7f16-4a8f-8cbe-9e4163ccc12b successfully destroyed container for instance ccd63041-fc2e-4cc0-8b35-55d25948d538
   2020-05-04T19:38:04.15+0530 [CELL/0] OUT Cell 40a05280-064a-408d-abe4-a6db0e5f8a9c successfully created container for instance 0b7cd2f2-1cb6-4e83-5041-50b5
   2020-05-04T19:38:05.16+0530 [CELL/0] OUT Downloading droplet...
   2020-05-04T19:38:17.36+0530 [CELL/0] OUT Downloaded droplet (142.4M)
   2020-05-04T19:38:17.36+0530 [CELL/0] OUT Starting health monitoring of container
   2020-05-04T19:38:27.43+0530 [APP/PROC/WEB/0] OUT Exit status 137 (out of memory)
   2020-05-04T19:38:27.44+0530 [CELL/SSHD/0] OUT Exit status 0
   2020-05-04T19:38:33.12+0530 [CELL/0] OUT Cell 40a05280-064a-408d-abe4-a6db0e5f8a9c stopping instance 0b7cd2f2-1cb6-4e83-5041-50b5
   2020-05-04T19:38:33.12+0530 [CELL/0] OUT Cell 40a05280-064a-408d-abe4-a6db0e5f8a9c destroying container for instance 0b7cd2f2-1cb6-4e83-5041-50b5
   2020-05-04T19:38:33.14+0530 [API/4] OUT Process has crashed with type: "web"
   2020-05-04T19:38:33.18+0530 [API/4] OUT App instance exited with guid f29f90c2-ffb4-484d-ba8c-0fa55ceeafe9 payload: {"instance"=>"0b7cd2f2-1cb6-4e83-5041-50b5", "index"=>0, "cell_id"=>"40a05280-064a-408d-abe4-a6db0e5f8a9c", "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 137 (out of memory)", "crash_count"=>1, "crash_timestamp"=>1588601313103432591, "version"=>"71b362a9-c192-4b3e-8143-f514c8ea64cb"}
   2020-05-04T19:38:33.30+0530 [CELL/0] OUT Cell f4198bdc-ef6a-44cf-a21d-7a7d24072eaa creating container for instance 396d3f9f-dad8-4a5d-7c09-35bb
   2020-05-04T19:38:33.40+0530 [PROXY/0] OUT Exit status 137
   2020-05-04T19:38:34.65+0530 [CELL/0] OUT Cell 40a05280-064a-408d-abe4-a6db0e5f8a9c successfully destroyed container for instance 0b7cd2f2-1cb6-4e83-5041-50b5
   2020-05-04T19:38:35.34+0530 [CELL/0] OUT Cell f4198bdc-ef6a-44cf-a21d-7a7d24072eaa successfully created container for instance 396d3f9f-dad8-4a5d-7c09-35bb
   2020-05-04T19:38:35.85+0530 [CELL/0] OUT Downloading droplet...
   2020-05-04T19:38:48.26+0530 [CELL/0] OUT Downloaded droplet (142.4M)
   2020-05-04T19:38:48.26+0530 [CELL/0] OUT Starting health monitoring of container
   2020-05-04T19:39:02.34+0530 [APP/PROC/WEB/0] OUT Exit status 137 (out of memory)
   2020-05-04T19:39:02.37+0530 [CELL/SSHD/0] OUT Exit status 0
   2020-05-04T19:39:08.34+0530 [CELL/0] OUT Cell f4198bdc-ef6a-44cf-a21d-7a7d24072eaa stopping instance 396d3f9f-dad8-4a5d-7c09-35bb
   2020-05-04T19:39:08.34+0530 [CELL/0] OUT Cell f4198bdc-ef6a-44cf-a21d-7a7d24072eaa destroying container for instance 396d3f9f-dad8-4a5d-7c09-35bb
   2020-05-04T19:39:08.50+0530 [API/8] OUT Process has crashed with type: "web"
   2020-05-04T19:39:08.52+0530 [CELL/0] OUT Cell c8dbca73-4ffc-4bde-8362-0fe98e683c38 creating container for instance ef87529f-a34b-44ef-7e1b-2972
   2020-05-04T19:39:08.59+0530 [API/8] OUT App instance exited with guid f29f90c2-ffb4-484d-ba8c-0fa55ceeafe9 payload: {"instance"=>"396d3f9f-dad8-4a5d-7c09-35bb", "index"=>0, "cell_id"=>"f4198bdc-ef6a-44cf-a21d-7a7d24072eaa", "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 137 (out of memory)", "crash_count"=>2, "crash_timestamp"=>1588601348330904116, "version"=>"71b362a9-c192-4b3e-8143-f514c8ea64cb"}
   2020-05-04T19:39:08.78+0530 [PROXY/0] OUT Exit status 137
   2020-05-04T19:39:09.76+0530 [CELL/0] OUT Cell c8dbca73-4ffc-4bde-8362-0fe98e683c38 successfully created container for instance ef87529f-a34b-44ef-7e1b-2972
   2020-05-04T19:39:10.01+0530 [CELL/0] OUT Downloading droplet...
   2020-05-04T19:39:11.08+0530 [CELL/0] OUT Cell f4198bdc-ef6a-44cf-a21d-7a7d24072eaa successfully destroyed container for instance 396d3f9f-dad8-4a5d-7c09-35bb
   2020-05-04T19:39:21.05+0530 [CELL/0] OUT Downloaded droplet (142.4M)
   2020-05-04T19:39:21.05+0530 [CELL/0] OUT Starting health monitoring of container
   2020-05-04T19:39:30.97+0530 [APP/PROC/WEB/0] OUT Exit status 137 (out of memory)
   2020-05-04T19:39:30.98+0530 [CELL/SSHD/0] OUT Exit status 0
   2020-05-04T19:39:36.63+0530 [CELL/0] OUT Cell c8dbca73-4ffc-4bde-8362-0fe98e683c38 stopping instance ef87529f-a34b-44ef-7e1b-2972
   2020-05-04T19:39:36.63+0530 [CELL/0] OUT Cell c8dbca73-4ffc-4bde-8362-0fe98e683c38 destroying container for instance ef87529f-a34b-44ef-7e1b-2972
   2020-05-04T19:39:36.74+0530 [API/2] OUT Process has crashed with type: "web"
   2020-05-04T19:39:36.78+0530 [API/2] OUT App instance exited with guid f29f90c2-ffb4-484d-ba8c-0fa55ceeafe9 payload: {"instance"=>"ef87529f-a34b-44ef-7e1b-2972", "index"=>0, "cell_id"=>"c8dbca73-4ffc-4bde-8362-0fe98e683c38", "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 137 (out of memory)", "crash_count"=>3, "crash_timestamp"=>1588601376635302163, "version"=>"71b362a9-c192-4b3e-8143-f514c8ea64cb"}
   2020-05-04T19:39:36.92+0530 [PROXY/0] OUT Exit status 137
   2020-05-04T19:39:38.41+0530 [CELL/0] OUT Cell c8dbca73-4ffc-4bde-8362-0fe98e683c38 successfully destroyed container for instance ef87529f-a34b-44ef-7e1b-2972
   2020-05-04T19:40:32.21+0530 [CELL/0] OUT Cell be941519-9b3a-40c0-a9ed-75d587fe3a77 creating container for instance 8ec22bc9-1e0d-40bb-55ff-253b
   2020-05-04T19:40:33.66+0530 [CELL/0] OUT Cell be941519-9b3a-40c0-a9ed-75d587fe3a77 successfully created container for instance 8ec22bc9-1e0d-40bb-55ff-253b
   2020-05-04T19:40:34.05+0530 [CELL/0] OUT Downloading droplet...
这是我上一个问题的链接,该问题涉及具有类似错误的同一应用程序:

这是我的github回购:


请告诉我如何修复此问题。

您的
manifest.yml
指定
内存:150M
。增加它,或者通过“重启”来“推送”你的应用程序,或者“缩放”你的应用程序。

如果你的git中的凭据是真实的,那么它们应该被删除。但是如果我从我的git回购中删除凭据,我的应用程序将如何运行?你将如何保持你的帐户(安全)并向世界公开你的凭据?现在任何人都可以访问您的资源。有服务绑定、共享机密、密钥保护(如vault)等。在CF中,通常是通过VCAP进行服务绑定。如果我将凭据存储在config.py文件(我将在.gitignore文件中添加该文件)中,然后从该文件导入app.py,会怎么样?