no stable job versions


 1 desired, 1 placed, 0 healthy, 1 unhealthy [restarts: 2] [health checks: 1 total]
Failed Instances

Failure #1

Instance
ID      	PROCESS	VERSION	REGION	DESIRED	STATUS	HEALTH CHECKS	RESTARTS	CREATED 
b7385be1	app    	0      	sea   	run    	failed	1 total      	2       	46s ago	

Recent Events
TIMESTAMP           	TYPE           	MESSAGE                                                         
2023-05-06T03:22:47Z	Received       	Task received by client                                        	
2023-05-06T03:22:47Z	Task Setup     	Building Task Directory                                        	
2023-05-06T03:23:07Z	Started        	Task started by client                                         	
2023-05-06T03:23:15Z	Terminated     	Exit Code: 3                                                   	
2023-05-06T03:23:15Z	Restarting     	Task restarting in 1.164651735s                                	
2023-05-06T03:23:20Z	Started        	Task started by client                                         	
2023-05-06T03:23:28Z	Terminated     	Exit Code: 3                                                   	
2023-05-06T03:23:28Z	Restarting     	Task restarting in 1.004718442s                                	
2023-05-06T03:23:33Z	Started        	Task started by client                                         	
2023-05-06T03:23:41Z	Terminated     	Exit Code: 3                                                   	
2023-05-06T03:23:41Z	Not Restarting 	Exceeded allowed attempts 2 in interval 5m0s and mode is "fail"	
2023-05-06T03:23:41Z	Alloc Unhealthy	Unhealthy because of failed task                               	
2023-05-06T03:23:42Z	Killing        	Sent interrupt. Waiting 5s before force killing                	

2023-05-06T03:23:38Z   [info]Traceback (most recent call last):
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2023-05-06T03:23:38Z   [info]    worker.init_process()
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
2023-05-06T03:23:38Z   [info]    self.load_wsgi()
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2023-05-06T03:23:38Z   [info]    self.wsgi = self.app.wsgi()
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
2023-05-06T03:23:38Z   [info]    self.callable = self.load()
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2023-05-06T03:23:38Z   [info]    return self.load_wsgiapp()
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2023-05-06T03:23:38Z   [info]    return util.import_app(self.app_uri)
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.10/site-packages/gunicorn/util.py", line 359, in import_app
2023-05-06T03:23:38Z   [info]    mod = importlib.import_module(module)
2023-05-06T03:23:38Z   [info]  File "/layers/paketo-buildpacks_cpython/cpython/lib/python3.10/importlib/__init__.py", line 126, in import_module
2023-05-06T03:23:38Z   [info]    return _bootstrap._gcd_import(name[level:], package, level)
2023-05-06T03:23:38Z   [info]  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
2023-05-06T03:23:38Z   [info]  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
2023-05-06T03:23:38Z   [info]  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
2023-05-06T03:23:38Z   [info]  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
2023-05-06T03:23:38Z   [info]  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
2023-05-06T03:23:38Z   [info]  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2023-05-06T03:23:38Z   [info]  File "/workspace/messaging_app.py", line 43, in <module>
2023-05-06T03:23:38Z   [info]    if glob.glob(cookie_path):
2023-05-06T03:23:38Z   [info]NameError: name 'cookie_path' is not defined
2023-05-06T03:23:38Z   [info][2023-05-06 03:23:38 +0000] [536] [INFO] Worker exiting (pid: 536)
2023-05-06T03:23:38Z   [info][2023-05-06 03:23:38 +0000] [520] [INFO] Shutting down: Master
2023-05-06T03:23:38Z   [info][2023-05-06 03:23:38 +0000] [520] [INFO] Reason: Worker failed to boot.
2023-05-06T03:23:39Z   [info]Starting clean up.
--> v0 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v1

Fly.toml is:

# fly.toml app configuration file generated for igmessaging on 2023-05-05T22:27:21+05:45
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "igmessaging"
kill_signal = "SIGINT"
kill_timeout = 5
primary_region = "sea"
processes = []

[build]
  builder = "paketobuildpacks/builder:base"
  command = "gunicorn messaging_app:igmessaging --bind 0.0.0.0:$PORT"


[env]
  PORT = "8080"

[experimental]
  auto_rollback = true

[[services]]
  http_checks = []
  internal_port = 8080
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    force_https = true
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

Hi,

Perhaps you have since fixed this, but that error message says that name 'cookie_path' is not defined. So … that would be my guess. Define that cookie_path (perhaps as an environment variable, not sure), deploy again, and see what happens :slightly_smiling_face:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.