Skip to main content

code=H10 desc="App crashed" Heroku Application error

I am trying to deploy an ML model using Flask on Heroku but the application keeps failing. I checked the logs and this is what I get to be the errors.

2021-05-30T23:40:59.657322+00:00 app[web.1]: File "/app/wsgi.py", line 1, in <module>
2021-05-30T23:40:59.657322+00:00 app[web.1]: from app.app import app
2021-05-30T23:40:59.657322+00:00 app[web.1]: ModuleNotFoundError: No module named 'app.app'; 'app' is not a package
2021-05-30T23:40:59.657552+00:00 app[web.1]: [2021-05-30 23:40:59 +0000] [9] [INFO] Worker exiting (pid: 9)
2021-05-30T23:40:59.660745+00:00 app[web.1]: [2021-05-30 23:40:59 +0000] [8] [ERROR] Exception in worker process
2021-05-30T23:40:59.660746+00:00 app[web.1]: Traceback (most recent call last):
2021-05-30T23:40:59.660747+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-05-30T23:40:59.660748+00:00 app[web.1]: worker.init_process()
2021-05-30T23:40:59.660749+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-05-30T23:40:59.660749+00:00 app[web.1]: self.load_wsgi()
2021-05-30T23:40:59.660749+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-05-30T23:40:59.660750+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-05-30T23:40:59.660751+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-05-30T23:40:59.660751+00:00 app[web.1]: self.callable = self.load()
2021-05-30T23:40:59.660751+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-05-30T23:40:59.660752+00:00 app[web.1]: return self.load_wsgiapp()
2021-05-30T23:40:59.660752+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-05-30T23:40:59.660753+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-05-30T23:40:59.660753+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/util.py", line 359, in import_app
2021-05-30T23:40:59.660753+00:00 app[web.1]: mod = importlib.import_module(module)
2021-05-30T23:40:59.660754+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2021-05-30T23:40:59.660754+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-05-30T23:40:59.660755+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2021-05-30T23:40:59.660755+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2021-05-30T23:40:59.660755+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2021-05-30T23:40:59.660756+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2021-05-30T23:40:59.660756+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 783, in exec_module
2021-05-30T23:40:59.660756+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2021-05-30T23:40:59.660757+00:00 app[web.1]: File "/app/wsgi.py", line 1, in <module>
2021-05-30T23:40:59.660757+00:00 app[web.1]: from app.app import app
2021-05-30T23:40:59.660757+00:00 app[web.1]: ModuleNotFoundError: No module named 'app.app'; 'app' is not a package
2021-05-30T23:40:59.661044+00:00 app[web.1]: [2021-05-30 23:40:59 +0000] [8] [INFO] Worker exiting (pid: 8)
2021-05-30T23:40:59.791609+00:00 app[web.1]: Traceback (most recent call last):
2021-05-30T23:40:59.791662+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 209, in run
2021-05-30T23:40:59.792162+00:00 app[web.1]: self.sleep()
2021-05-30T23:40:59.792195+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 357, in sleep
2021-05-30T23:40:59.792662+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2021-05-30T23:40:59.792694+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2021-05-30T23:40:59.793035+00:00 app[web.1]: self.reap_workers()
2021-05-30T23:40:59.793060+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2021-05-30T23:40:59.793506+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-05-30T23:40:59.793688+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2021-05-30T23:40:59.793707+00:00 app[web.1]:
2021-05-30T23:40:59.793708+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2021-05-30T23:40:59.793708+00:00 app[web.1]:
2021-05-30T23:40:59.793733+00:00 app[web.1]: Traceback (most recent call last):
2021-05-30T23:40:59.793759+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 8, in <module>
2021-05-30T23:40:59.794022+00:00 app[web.1]: sys.exit(run())
2021-05-30T23:40:59.794044+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
2021-05-30T23:40:59.794296+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2021-05-30T23:40:59.794318+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 231, in run
2021-05-30T23:40:59.794671+00:00 app[web.1]: super().run()
2021-05-30T23:40:59.794695+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run
2021-05-30T23:40:59.794942+00:00 app[web.1]: Arbiter(self).run()
2021-05-30T23:40:59.795007+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 229, in run
2021-05-30T23:40:59.795492+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2021-05-30T23:40:59.795516+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 342, in halt
2021-05-30T23:40:59.795922+00:00 app[web.1]: self.stop()
2021-05-30T23:40:59.795946+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 393, in stop
2021-05-30T23:40:59.796400+00:00 app[web.1]: time.sleep(0.1)
2021-05-30T23:40:59.796427+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2021-05-30T23:40:59.796751+00:00 app[web.1]: self.reap_workers()
2021-05-30T23:40:59.796782+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2021-05-30T23:40:59.797247+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-05-30T23:40:59.797373+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2021-05-30T23:40:59.882701+00:00 heroku[web.1]: Process exited with status 1
2021-05-30T23:40:59.965187+00:00 heroku[web.1]: State changed from up to crashed
2021-05-30T23:46:22.786158+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-lr-model.herokuapp.com request_id=14d024e3-5e3b-4f3e-86b1-b223f9fcea0d fwd="197.210.29.146" dyno= connect= service= status=503 bytes= protocol=https
2021-05-30T23:46:23.592882+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=simple-lr-model.herokuapp.com request_id=a7711329-41f2-4faa-9e1f-bd28a7be78ee fwd="197.210.29.146" dyno= connect= service= status=503 bytes= protocol=https

I have tried solutions such as heroku restart but did not work.

I also used heroku run rails console. It returned bash: rails: command not found.

I am not sure what to do right now! I see some ModuleNotFoundError and some code=H10 desc="App crashed" error in the end.

How can I possibly solve this? Thank you!



source https://stackoverflow.com/questions/67766700/code-h10-desc-app-crashed-heroku-application-error

Comments

Popular posts from this blog

ValueError: X has 10 features, but LinearRegression is expecting 1 features as input

So, I am trying to predict the model but its throwing error like it has 10 features but it expacts only 1. So I am confused can anyone help me with it? more importantly its not working for me when my friend runs it. It works perfectly fine dose anyone know the reason about it? cv = KFold(n_splits = 10) all_loss = [] for i in range(9): # 1st for loop over polynomial orders poly_order = i X_train = make_polynomial(x, poly_order) loss_at_order = [] # initiate a set to collect loss for CV for train_index, test_index in cv.split(X_train): print('TRAIN:', train_index, 'TEST:', test_index) X_train_cv, X_test_cv = X_train[train_index], X_test[test_index] t_train_cv, t_test_cv = t[train_index], t[test_index] reg.fit(X_train_cv, t_train_cv) loss_at_order.append(np.mean((t_test_cv - reg.predict(X_test_cv))**2)) # collect loss at fold all_loss.append(np.mean(loss_at_order)) # collect loss at order plt.plot(np.log(al...

Sorting large arrays of big numeric stings

I was solving bigSorting() problem from hackerrank: Consider an array of numeric strings where each string is a positive number with anywhere from to digits. Sort the array's elements in non-decreasing, or ascending order of their integer values and return the sorted array. I know it works as follows: def bigSorting(unsorted): return sorted(unsorted, key=int) But I didnt guess this approach earlier. Initially I tried below: def bigSorting(unsorted): int_unsorted = [int(i) for i in unsorted] int_sorted = sorted(int_unsorted) return [str(i) for i in int_sorted] However, for some of the test cases, it was showing time limit exceeded. Why is it so? PS: I dont know exactly what those test cases were as hacker rank does not reveal all test cases. source https://stackoverflow.com/questions/73007397/sorting-large-arrays-of-big-numeric-stings

How to load Javascript with imported modules?

I am trying to import modules from tensorflowjs, and below is my code. test.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title </head> <body> <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.0.0/dist/tf.min.js"></script> <script type="module" src="./test.js"></script> </body> </html> test.js import * as tf from "./node_modules/@tensorflow/tfjs"; import {loadGraphModel} from "./node_modules/@tensorflow/tfjs-converter"; const MODEL_URL = './model.json'; const model = await loadGraphModel(MODEL_URL); const cat = document.getElementById('cat'); model.execute(tf.browser.fromPixels(cat)); Besides, I run the server using python -m http.server in my command prompt(Windows 10), and this is the error prompt in the console log of my browser: Failed to loa...