Deployment in staging failing due to unhealthy allocation.

Hi,
Posting it again as I still am struggling to make my app work in fly.io
Staging deployment suddenly started failing and hence the production deployment is not working either.

I checked my fly.toml where I can verify the ports are correct. Sharing it below.
I scaled my RAM to 512MB still facing the issue.
Now I see my staging is DEAD.

My fly.toml

app = “xxxproject”
kill_signal = “SIGINT”
kill_timeout = 5
processes =

[env]
PORT = “8080”
METRICS_PORT = “8081”

[metrics]
port = 8_081
path = “/metrics”

[deploy]
release_command = “npx prisma migrate deploy”

[experimental]
allowed_public_ports =
auto_rollback = true

[[services]]
internal_port = 8_080
processes = [ “app” ]
protocol = “tcp”
script_checks =

[services.concurrency]
hard_limit = 25
soft_limit = 20
type = “connections”

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

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

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

[[services.http_checks]]
interval = “10s”
grace_period = “5s”
method = “get”
path = “/healthcheck”
protocol = “http”
timeout = “2s”
tls_skip_verify = false
headers = { }

Should I create new apps or what? I am using Remix Run, if that is important.

Error: failed to fetch an image or build from source: error fetching docker server info: Get “http://[fdaa:1:e66:a7b:fe:f19a:7b72:2]:2375/v1.41/info”: context deadline exceeded

I get this error if I try to deploy using fly deploy.

fly status --all shows the following
Instances
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
f5747a16 app 3 ⇡ ams run running 2 total, 2 passing 0 2023-04-25T23:47:40Z
36a94858 app 2 ams stop failed 2 total 2 2023-04-28T16:47:07Z

Unhealthy allocation likely means that your health checks are failing.
There’s usually some helpful debug information in your app’s logs, try checking fly logs if you haven’t

The deploy error is odd, it looks to me like a remote builder failure. if you run fly apps list and you see a fly-builder-[something] in there, try removing that app. flyctl will generate a new one next time you deploy, and that might fix whatever was getting mixed up.

I hope that helps!

Thanks for the reply. Did what you said. Still the issue. My logs:

2023-05-02T18:11:20Z app[3757c420] maa [info]All migrations have been successfully applied.
2023-05-02T18:11:20Z app[3757c420] maa [info]npm notice
2023-05-02T18:11:20Z app[3757c420] maa [info]npm notice New major version of npm available! 8.19.4 → 9.6.5
2023-05-02T18:11:20Z app[3757c420] maa [info]npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.5
2023-05-02T18:11:20Z app[3757c420] maa [info]npm notice Run npm install -g npm@9.6.5 to update!
2023-05-02T18:11:20Z app[3757c420] maa [info]npm notice
2023-05-02T18:11:21Z app[3757c420] maa [info]Starting clean up.
2023-05-02T18:11:34Z runner[2c6dbda6] maa [info]Starting instance
2023-05-02T18:11:34Z runner[2c6dbda6] maa [info]Configuring virtual machine
2023-05-02T18:11:34Z runner[2c6dbda6] maa [info]Pulling container image
2023-05-02T18:11:37Z runner[2c6dbda6] maa [info]Unpacking image
2023-05-02T18:11:37Z runner[2c6dbda6] maa [info]Preparing kernel init
2023-05-02T18:11:37Z runner[2c6dbda6] maa [info]Configuring firecracker
2023-05-02T18:11:37Z runner[2c6dbda6] maa [info]Starting virtual machine
2023-05-02T18:11:38Z app[2c6dbda6] maa [info]Starting init (commit: 15c0f38)…
2023-05-02T18:11:38Z app[2c6dbda6] maa [info]Preparing to run: docker-entrypoint.sh npm start as root
2023-05-02T18:11:38Z app[2c6dbda6] maa [info]2023/05/02 18:11:38 listening on [fdaa:2:19a7:a7b:14bf:2c6d:bda6:2]:22 (DNS: [fdaa::3]:53)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]> start
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]> cross-env NODE_ENV=production node ./build/server.js
2023-05-02T18:11:39Z health[2c6dbda6] maa [warn]Health check on port 8080 is in a ‘warning’ state. Your app may not be responding properly. Services exposed on ports [80, 443] may have intermittent failures until the health check passes.
2023-05-02T18:11:39Z health[2c6dbda6] maa [warn]Health check on port 8080 is in a ‘warning’ state. Your app may not be responding properly. Services exposed on ports [80, 443] may have intermittent failures until the health check passes.
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]:electric_plug: setting up prisma client to maa.devyproject-db.flycast:5432
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]Error: Cannot find module ‘prop-types’
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]Require stack:
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]- /myapp/node_modules/react-ga/dist/react-ga.js
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]- /myapp/build/index.js
2023-05-02T18:11:39Z app[2c6dbda6] maa [info]- /myapp/build/server.js
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Function.Module._load (node:internal/modules/cjs/loader:871:27)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Module.require (node:internal/modules/cjs/loader:1098:19)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at require (node:internal/modules/cjs/helpers:108:18)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at webpackUniversalModuleDefinition (/myapp/node_modules/react-ga/dist/react-ga.js:3:46)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Object. (/myapp/node_modules/react-ga/dist/react-ga.js:10:3)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Module._compile (node:internal/modules/cjs/loader:1196:14)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Object.Module._extensions…js (node:internal/modules/cjs/loader:1250:10)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Module.load (node:internal/modules/cjs/loader:1074:32)
2023-05-02T18:11:39Z app[2c6dbda6] maa [info] at Function.Module._load (node:internal/modules/cjs/loader:909:12)
2023-05-02T18:11:40Z app[2c6dbda6] maa [info]Starting clean up.
2023-05-02T18:11:46Z runner[2c6dbda6] maa [info]Starting instance
2023-05-02T18:11:46Z runner[2c6dbda6] maa [info]Configuring virtual machine
2023-05-02T18:11:46Z runner[2c6dbda6] maa [info]Pulling container image
2023-05-02T18:11:47Z runner[2c6dbda6] maa [info]Unpacking image
2023-05-02T18:11:47Z runner[2c6dbda6] maa [info]Preparing kernel init
2023-05-02T18:11:48Z runner[2c6dbda6] maa [info]Configuring firecracker
2023-05-02T18:11:48Z runner[2c6dbda6] maa [info]Starting virtual machine
2023-05-02T18:11:48Z app[2c6dbda6] maa [info]Starting init (commit: 15c0f38)…
2023-05-02T18:11:48Z app[2c6dbda6] maa [info]Preparing to run: docker-entrypoint.sh npm start as root
2023-05-02T18:11:48Z app[2c6dbda6] maa [info]2023/05/02 18:11:48 listening on [fdaa:2:19a7:a7b:14bf:2c6d:bda6:2]:22 (DNS: [fdaa::3]:53)
2023-05-02T18:11:49Z app[2c6dbda6] maa [info]> start
2023-05-02T18:11:49Z app[2c6dbda6] maa [info]> cross-env NODE_ENV=production node ./build/server.js
2023-05-02T18:11:50Z app[2c6dbda6] maa [info]:electric_plug: setting up prisma client to maa.devyproject-db.flycast:5432
2023-05-02T18:11:50Z app[2c6dbda6] maa [info]Error: Cannot find module ‘prop-types’
2023-05-02T18:11:50Z app[2c6dbda6] maa [info]Require stack:
2023-05-02T18:11:50Z app[2c6dbda6] maa [info]- /myapp/node_modules/react-ga/dist/react-ga.js
2023-05-02T18:11:50Z app[2c6dbda6] maa [info]- /myapp/build/index.js
2023-05-02T18:11:50Z app[2c6dbda6] maa [info]- /myapp/build/server.js
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Function.Module._load (node:internal/modules/cjs/loader:871:27)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Module.require (node:internal/modules/cjs/loader:1098:19)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at require (node:internal/modules/cjs/helpers:108:18)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at webpackUniversalModuleDefinition (/myapp/node_modules/react-ga/dist/react-ga.js:3:46)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Object. (/myapp/node_modules/react-ga/dist/react-ga.js:10:3)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Module._compile (node:internal/modules/cjs/loader:1196:14)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Object.Module._extensions…js (node:internal/modules/cjs/loader:1250:10)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Module.load (node:internal/modules/cjs/loader:1074:32)
2023-05-02T18:11:50Z app[2c6dbda6] maa [info] at Function.Module._load (node:internal/modules/cjs/loader:909:12)
2023-05-02T18:11:50Z health[2c6dbda6] maa [warn]Health check on port 8080 is in a ‘warning’ state. Your app may not be responding properly. Services exposed on ports [80, 443] may have intermittent failures until the health check passes.
2023-05-02T18:11:50Z health[2c6dbda6] maa [warn]Health check on port 8080 is in a ‘warning’ state. Your app may not be responding properly. Services exposed on ports [80, 443] may have intermittent failures until the health check passes.
2023-05-02T18:11:50Z app[2c6dbda6] maa [info]Starting clean up.
2023-05-02T18:11:56Z runner[2c6dbda6] maa [info]Starting instance
2023-05-02T18:11:57Z runner[2c6dbda6] maa [info]Configuring virtual machine
2023-05-02T18:11:57Z runner[2c6dbda6] maa [info]Pulling container image
2023-05-02T18:11:58Z runner[2c6dbda6] maa [info]Unpacking image
2023-05-02T18:11:58Z runner[2c6dbda6] maa [info]Preparing kernel init
2023-05-02T18:12:00Z runner[2c6dbda6] maa [info]Configuring firecracker
2023-05-02T18:12:00Z runner[2c6dbda6] maa [info]Starting virtual machine
2023-05-02T18:12:01Z app[2c6dbda6] maa [info]Starting init (commit: 15c0f38)…
2023-05-02T18:12:01Z app[2c6dbda6] maa [info]Preparing to run: docker-entrypoint.sh npm start as root
2023-05-02T18:12:01Z app[2c6dbda6] maa [info]2023/05/02 18:12:01 listening on [fdaa:2:19a7:a7b:14bf:2c6d:bda6:2]:22 (DNS: [fdaa::3]:53)
2023-05-02T18:12:01Z app[2c6dbda6] maa [info]> start
2023-05-02T18:12:01Z app[2c6dbda6] maa [info]> cross-env NODE_ENV=production node ./build/server.js
2023-05-02T18:12:02Z app[2c6dbda6] maa [info]:electric_plug: setting up prisma client to maa.devyproject-db.flycast:5432
2023-05-02T18:12:02Z app[2c6dbda6] maa [info]Error: Cannot find module ‘prop-types’
2023-05-02T18:12:02Z app[2c6dbda6] maa [info]Require stack:
2023-05-02T18:12:02Z app[2c6dbda6] maa [info]- /myapp/node_modules/react-ga/dist/react-ga.js
2023-05-02T18:12:02Z app[2c6dbda6] maa [info]- /myapp/build/index.js
2023-05-02T18:12:02Z app[2c6dbda6] maa [info]- /myapp/build/server.js
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Function.Module._load (node:internal/modules/cjs/loader:871:27)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Module.require (node:internal/modules/cjs/loader:1098:19)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at require (node:internal/modules/cjs/helpers:108:18)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at webpackUniversalModuleDefinition (/myapp/node_modules/react-ga/dist/react-ga.js:3:46)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Object. (/myapp/node_modules/react-ga/dist/react-ga.js:10:3)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Module._compile (node:internal/modules/cjs/loader:1196:14)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Object.Module._extensions…js (node:internal/modules/cjs/loader:1250:10)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Module.load (node:internal/modules/cjs/loader:1074:32)
2023-05-02T18:12:02Z app[2c6dbda6] maa [info] at Function.Module._load (node:internal/modules/cjs/loader:909:12)
2023-05-02T18:12:02Z health[2c6dbda6] maa [warn]Health check on port 8080 is in a ‘warning’ state. Your app may not be responding properly. Services exposed on ports [80, 443] may have intermittent failures until the health check passes.
2023-05-02T18:12:02Z health[2c6dbda6] maa [warn]Health check on port 8080 is in a ‘warning’ state. Your app may not be responding properly. Services exposed on ports [80, 443] may have intermittent failures until the health check passes.
2023-05-02T18:12:03Z app[2c6dbda6] maa [info]Starting clean up.