pushing keras with tensorflow backend crashes in heroku - heroku

I've a flask app and it works fine on my local system. It has keras with tensorflow backend and it runs on python 3.6.
When I push my code to heroku. It starts downloading this file which never happens on my local system and it crashes.:
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5
I'm guessing it is memory/timeout error. I'm using free heroku account for this.
How can I get it to work on heroku?
Error Log:
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

Related

Heroku: This site can’t be reached

My heroku app cannot be accessed after a build. The logs show that the web server node and worker node both are listening.
It's a flask app run by gunicorn and it has 2 addons - newrelic and redistogo.
Error:
This site can’t be reached.
appname.herokuapp.com’s server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN
Logs:
```2020-02-05T16:24:31.556201+00:00 heroku[worker.1]: Starting process with command `python worker.py`
2020-02-05T16:24:32.278863+00:00 heroku[worker.1]: State changed from starting to up
2020-02-05T16:24:33.363132+00:00 app[worker.1]: 16:24:33 RQ worker started, version 0.5.1
2020-02-05T16:24:33.364484+00:00 app[worker.1]: 16:24:33
2020-02-05T16:24:33.364574+00:00 app[worker.1]: 16:24:33 *** Listening on high, default, low...
2020-02-05T16:24:35.295791+00:00 heroku[web.1]: Starting process with command `newrelic-admin run-program gunicorn app:server`
2020-02-05T16:24:41.159117+00:00 heroku[web.1]: State changed from starting to up
2020-02-05T16:24:40.959907+00:00 app[web.1]: [2020-02-05 16:24:40 +0000] [4] [INFO] Starting gunicorn 20.0.4
2020-02-05T16:24:40.961836+00:00 app[web.1]: [2020-02-05 16:24:40 +0000] [4] [INFO] Listening at: http://0.0.0.0:21126 (4)
2020-02-05T16:24:40.962097+00:00 app[web.1]: [2020-02-05 16:24:40 +0000] [4] [INFO] Using worker: sync
2020-02-05T16:24:40.971809+00:00 app[web.1]: [2020-02-05 16:24:40 +0000] [12] [INFO] Booting worker with pid: 12
2020-02-05T16:24:41.143051+00:00 app[web.1]: [2020-02-05 16:24:41 +0000] [20] [INFO] Booting worker with pid: 20```
EDIT:
Procfile:
web: newrelic-admin run-program gunicorn app:server
worker: python worker.py
Worker:
import os
import redis
from rq import Worker, Queue, Connection
listen = ['high', 'default', 'low']
redis_url = os.getenv('REDISTOGO_URL', 'redis://localhost:6379')
conn = redis.from_url(redis_url)
if __name__ == '__main__':
with Connection(conn):
worker = Worker(list(map(Queue, listen)))
worker.work()
The app is accessible now. It seems to be downtime with Heroku. Although they haven't reported this in their status page.

Heroku Idling because quota is exhausted

What does this mean? State changed from up to down Idling because quota is exhausted Stopping all processes with SIGTERM
My heroku app shut down and when I type heroku logs -t it give me this
State changed from crashed to starting
2019-02-27T09:41:54.000000+00:00 app[api]: Build succeeded
2019-02-27T09:41:57.263955+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 41036 -e production`
2019-02-27T09:42:08.039524+00:00 heroku[web.1]: State changed from starting to up
2019-02-27T09:42:08.050315+00:00 heroku[web.1]: Idling
2019-02-27T09:42:08.054726+00:00 heroku[web.1]: State changed from up to down
2019-02-27T09:42:08.066260+00:00 heroku[web.1]: Idling because quota is exhausted
2019-02-27T09:42:07.658395+00:00 app[web.1]: [2019-02-27 09:42:07] INFO WEBrick 1.3.1
2019-02-27T09:42:07.658431+00:00 app[web.1]: [2019-02-27 09:42:07] INFO ruby 2.3.7 (2018-03-28) [x86_64-linux]
2019-02-27T09:42:07.658737+00:00 app[web.1]: [2019-02-27 09:42:07] INFO WEBrick::HTTPServer#start: pid=4 port=41036
2019-02-27T09:42:08.831687+00:00 heroku[router]: at=info code=H82 desc="Free app running time quota exhausted" method=GET path="/" host=www.petraauto.com request_id=17318012-510b-47e2-9277-fe1a448ec3ea fwd="174.6.158.167" dyno= connect= service= status=503 bytes= protocol=http
2019-02-27T09:42:09.238077+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2019-02-27T09:42:09.270539+00:00 app[web.1]: [2019-02-27 09:42:09] FATAL SignalException: SIGTERM
2019-02-27T09:42:09.270590+00:00 app[web.1]: /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/webrick/server.rb:177:in `select'
2019-02-27T09:42:09.270592+00:00 app[web.1]: /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/webrick/server.rb:177:in `block in start'
2019-02-27T09:42:09.270594+00:00 app[web.1]: /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/webrick/server.rb:33:in `start'
2019-02-27T09:42:09.270596+00:00 app[web.1]: /app/vendor/ruby-2.3.7/lib/ruby/2.3.0/webrick/server.rb:164:in `start'
2019-02-27T09:42:09.270597+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/handler/webrick.rb:14:in `run'
2019-02-27T09:42:09.270599+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:264:in `start'
2019-02-27T09:42:09.270600+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.8/lib/rails/commands/server.rb:69:in `start'
2019-02-27T09:42:09.270605+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2019-02-27T09:42:09.270606+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
2019-02-27T09:42:09.270608+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
2019-02-27T09:42:09.270610+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2019-02-27T09:42:09.270611+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
2019-02-27T09:42:09.270613+00:00 app[web.1]: bin/rails:4:in `require'
2019-02-27T09:42:09.270615+00:00 app[web.1]: bin/rails:4:in `<main>'
2019-02-27T09:42:09.273222+00:00 app[web.1]: [2019-02-27 09:42:09] INFO going to shutdown ...
2019-02-27T09:42:09.273252+00:00 app[web.1]: [2019-02-27 09:42:09] INFO WEBrick::HTTPServer#start done.
2019-02-27T09:42:09.273368+00:00 app[web.1]: => Booting WEBrick
You've run out of time on your Free Dynos.
https://devcenter.heroku.com/articles/error-codes#h82-free-dyno-quota-exhausted
https://devcenter.heroku.com/articles/free-dyno-hours#free-dyno-hour-pool
**RECENT UPDATE
Hey your post helped me out this morning. Unfortunately, minutes later, I received an email from Salesforce.
It looks like moving forward Heroku will no longer offer the free services, such as free Dynos. I think it discontinues November 28th or so.
Give the following a read: https://blog.heroku.com/next-chapter
And prepare accordingly for your applications using free dynos!

How to deploy react-native-web app into heroku?

I am trying to use react-native-web in my college project.
I've following steps here and successfully create a dev version of react-native-web app. I want to deploy my app onto Heroku, after searching many questions, I still can't run my app on Heroku. It always crashed after 60 seconds after starting.
2018-02-24T19:19:44.376383+00:00 heroku[web.1]: Starting process with command `./node_modules/.bin/webpack-dev-server --inline --port 28330`
2018-02-24T19:19:49.667640+00:00 app[web.1]: Project is running at [1m[34mhttp://localhost:28330/[39m[22m
2018-02-24T19:19:49.668544+00:00 app[web.1]: webpack output is served from [1m[34m/[39m[22m
2018-02-24T19:20:02.082843+00:00 app[web.1]: Hash: [1m070ba25084e72482b7f3[39m[22m
2018-02-24T19:20:02.082868+00:00 app[web.1]: Version: webpack [1m3.11.0[39m[22m
2018-02-24T19:20:02.082871+00:00 app[web.1]: Time: [1m11923[39m[22mms
2018-02-24T19:20:02.082873+00:00 app[web.1]: [1mAsset[39m[22m [1mSize[39m[22m [1mChunks[39m[22m [1m[39m[22m [1m[39m[22m [1mChunk Names[39m[22m
2018-02-24T19:20:02.082874+00:00 app[web.1]: [1m[33mbundle.js[39m[22m [1m[33m2.35 MB[39m[22m [1m0[39m[22m [1m[32m[emitted][39m[22m [1m[33m[big][39m[22m main
2018-02-24T19:20:02.082877+00:00 app[web.1]: [2] [1m./node_modules/react/index.js[39m[22m 190 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082878+00:00 app[web.1]: [65] [1m./node_modules/react-native-web/dist/index.js[39m[22m 12.9 kB {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082880+00:00 app[web.1]: [122] [1mmulti (webpack)-dev-server/client?http://localhost:28330 ./index.web.js[39m[22m 40 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082882+00:00 app[web.1]: [123] [1m(webpack)-dev-server/client?http://localhost:28330[39m[22m 7.91 kB {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082884+00:00 app[web.1]: [124] [1m./node_modules/url/url.js[39m[22m 23.3 kB {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082885+00:00 app[web.1]: [131] [1m./node_modules/strip-ansi/index.js[39m[22m 161 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082887+00:00 app[web.1]: [133] [1m./node_modules/loglevel/lib/loglevel.js[39m[22m 7.86 kB {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082889+00:00 app[web.1]: [134] [1m(webpack)-dev-server/client/socket.js[39m[22m 1.08 kB {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082890+00:00 app[web.1]: [136] [1m(webpack)-dev-server/client/overlay.js[39m[22m 3.67 kB {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082892+00:00 app[web.1]: [141] [1m(webpack)/hot nonrecursive ^\.\/log$[39m[22m 170 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082893+00:00 app[web.1]: [143] [1m(webpack)/hot/emitter.js[39m[22m 77 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082895+00:00 app[web.1]: [145] [1m./index.web.js[39m[22m 380 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082897+00:00 app[web.1]: [243] [1m./node_modules/react-native-web/dist/exports/Vibration/index.js[39m[22m 796 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082899+00:00 app[web.1]: [283] [1m./node_modules/react-native-web/dist/exports/VirtualizedList/index.js[39m[22m 327 bytes {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082901+00:00 app[web.1]: [285] [1m./App.js[39m[22m 2.53 kB {[1m[33m0[39m[22m}[1m[32m [built][39m[22m
2018-02-24T19:20:02.082903+00:00 app[web.1]: + 271 hidden modules
2018-02-24T19:20:02.082911+00:00 app[web.1]: webpack: Compiled successfully.
2018-02-24T19:20:21.276101+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-02-24T19:20:21.276101+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-02-24T19:20:21.364850+00:00 heroku[web.1]: Process exited with status 137
2018-02-24T19:20:44.673361+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-02-24T19:20:44.673652+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-02-24T19:20:44.812657+00:00 heroku[web.1]: Process exited with status 137
2018-02-24T19:20:44.892098+00:00 heroku[web.1]: State changed from starting to crashed
Is there anyone who can show me the steps to deploy my react-native-web into Heroku?
Thanks.
You're trying to run the webpack-dev-server in a production environment, which is not recommended.
You will need to:
Setup a production webpack build script in npm/yarn so that your browser side code gets built (usually output to a 'build' or 'dist' directory). There should be instructions for on Heroku (see here) so it knows which script to run to build this on the server after the server checks out your master branch.
Setup a minimal server script that is loaded via a 'start' script. Try ExpressJs for this. Note that Heroku creates a PORT environment variable (process.env.PORT) that contains the assigned HTTP port to use for the HTTP server (pass it to express.listen). Heroku have a minimal Express server example to look at.

Flask app on heroku

I have an issue making my flask app working on heroku.
I'm using a simple flask app along flask-sqlalchemy
I didin't find anything specific on my problem altough I think I understand but can't figure it out how to make it work.
Here is the requirements.txt content:
alembic==0.9.2
click==6.7
Flask==0.12.2
Flask-Migrate==2.0.4
Flask-Script==2.0.5
Flask-SQLAlchemy==2.2
Flask-WTF==0.14.2
gunicorn==19.7.1
itsdangerous==0.24
Jinja2==2.9.6
Mako==1.0.6
MarkupSafe==1.0
python-dateutil==2.6.0
python-editor==1.0.3
six==1.10.0
SQLAlchemy==1.1.10
Werkzeug==0.12.2
WTForms==2.1
Here is the Procfile content:
web: gunicorn main:app
Here is the output of log files in heroku dashboard
2017-06-03T06:59:24.005560+00:00 app[web.1]: return __import__('MySQLdb')
2017-06-03T06:59:24.005561+00:00 app[web.1]: ImportError: No module named MySQLdb
2017-06-03T06:59:24.769740+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=aqueous-spire-85572.herokuapp.com request_id=965e64b9-20f0-4aa0-8a71-d564068a5c70 fwd="31.5.203.202" dyno=web.1 connect=1ms service=16ms status=404 bytes=386 protocol=https
2017-06-03T07:32:46.321187+00:00 heroku[web.1]: Idling
2017-06-03T07:32:46.321726+00:00 heroku[web.1]: State changed from up to down
2017-06-03T07:32:47.062599+00:00 app[web.1]: [2017-06-03 07:32:47 +0000] [4] [INFO] Handling signal: term
2017-06-03T07:32:47.062699+00:00 app[web.1]: [2017-06-03 07:32:47 +0000] [10] [INFO] Worker exiting (pid: 10)
2017-06-03T07:32:47.063539+00:00 app[web.1]: [2017-06-03 07:32:47 +0000] [9] [INFO] Worker exiting (pid: 9)
2017-06-03T07:32:47.110825+00:00 app[web.1]: [2017-06-03 07:32:47 +0000] [4] [INFO] Shutting down: Master
2017-06-03T07:32:47.055557+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-06-03T07:32:47.247466+00:00 heroku[web.1]: Process exited with status 0
The error message tells you, that you haven't installed the MySQLdb module. Add it to your requirements.txt

Rails 5 in production with heroku

I use rails 5 with actioncable on heroku and i have this error only in production
WebSocket connection to 'wss://adham-chatty.heroku.com/cable' failed: WebSocket opening handshake was canceled
i think because of puma
2016-01-21T23:33:56.372977+00:00 heroku[web.1]: Starting process with command `bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}`
2016-01-21T23:33:57.651242+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-01-21T23:33:58.721808+00:00 app[web.1]: [3] - Gracefully shutting down workers...
2016-01-21T23:33:58.873303+00:00 app[web.1]: [3] === puma shutdown: 2016-01-21 23:33:58 +0000 ===
2016-01-21T23:33:58.873305+00:00 app[web.1]: [3] - Goodbye!
2016-01-21T23:33:58.910391+00:00 app[web.1]: [3] Puma starting in cluster mode...
2016-01-21T23:33:58.910405+00:00 app[web.1]: [3] * Version 2.15.3 (ruby 2.2.3-p173), codename: Autumn Arbor Airbrush
2016-01-21T23:33:58.910407+00:00 app[web.1]: [3] * Min threads: 5, max threads: 5
2016-01-21T23:33:58.910409+00:00 app[web.1]: [3] * Environment: production
2016-01-21T23:33:58.910429+00:00 app[web.1]: [3] * Process workers: 2
2016-01-21T23:33:58.910453+00:00 app[web.1]: [3] * Preloading application
2016-01-21T23:33:59.632680+00:00 heroku[web.1]: Process exited with status 0
I just spent an evening and got my rails 5 ActionCable app working wonderfully on Heroku. I wrote up what I learned after going through a lot of hoops here: http://www.whodya.com/posts/19632. What I'd guess from looking at your error message above is, ahem, exactly the same problem I had for a bit. You're trying to use wss: to connect, but this only works if you're using SSL/HTTPS on your server. Try ws: instead, until you get HTTPS up and running. Again, my write-up is here (http://www.whodya.com/posts/19632), with my config/settings/etc.
-John

Resources