I have an app running on Fly (two machines) for which I’ve recently switched my Express server for an HTTP/2 server with spdy
. The reason for which was that I needed the multiplexing feature in my app.
I tried to deploy my app, but all the deployments fail because of net/http: request canceled
errors. I’ve tried changing the protocol of my healthcheck configuration but nothing seems to be working. I can see in the dashboard that the TCP check on port 8080 succeeds, but the HTTP check on port 8080 fails with “connect: connection refused”.
I’m now not sure what steps I’d need to take in order to address this issue, because it seems like the machine will has booted up, but it cannot be reached.
For reference, this is my config file:
# fly.toml app configuration file generated for weddingfest on 2023-06-23T15:19:48+02:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "weddingfest"
primary_region = "ams"
kill_signal = "SIGINT"
kill_timeout = "5s"
[experimental]
auto_rollback = true
[deploy]
release_command = "npm run release"
[env]
PORT = "8080"
PRIMARY_REGION = "ams"
[mounts]
source = "weddingfest_data"
destination = "/weddingfest/images"
[[services]]
protocol = "tcp"
internal_port = 8080
processes = ["app"]
[[services.ports]]
port = 80
handlers = ["http"]
force_https = true
[[services.ports]]
port = 443
handlers = ["tls", "http"]
[services.concurrency]
type = "connections"
hard_limit = 25
soft_limit = 20
[[services.tcp_checks]]
interval = "15s"
timeout = "2s"
grace_period = "1s"
restart_limit = 0
[[services.http_checks]]
interval = "10s"
timeout = "2s"
grace_period = "5s"
restart_limit = 0
method = "get"
path = "/healthcheck"
protocol = "http"
A few notes:
- In the
[[services.http_checks]]
block I also tried theprotocol = "https"
option in combination withtls_skip_verify = false
, but that yielded the same error. - Before I changed the server package, the app ran and could be connected to. I only switched the server package but kept the rest of the server code the same.