Good day everyone!
I’ve run a GRPC service on fly.io with the next config:
# fly.toml app configuration file generated for ****** on 2024-08-04T13:56:17+03:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'my_perfect_app_name'
primary_region = 'waw'
[[services]]
protocol = 'tcp'
internal_port = 50051
auto_stop_machines = "off"
auto_start_machines = true
min_machines_running = 1
processes = ['app']
[[services.ports]]
port = 443
handlers = ['tls']
[services.ports.tls_options]
alpn = ["h2"]
[services.concurrency]
type = "connections"
hard_limit = 25
soft_limit = 20
[[services.tcp_checks]]
grace_period = "60s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[checks]
[checks.transcription_service_tcp_check]
grace_period = "60s"
interval = "15s"
port = 50051
timeout = "10s"
type = "tcp"
[deploy]
wait_timeout = "2m"
[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 2
As I got it, with auto_stop_machines = "off"
and min_machines_running = 1
it must be running all time (I see that in the dashboard / service / machines).
After idle time for a first request I get the next (via ghz):
Status code distribution:
[OK] 199 responses
[DeadlineExceeded] 1 responses
Error distribution:
[1] rpc error: code = DeadlineExceeded desc = context deadline exceeded
And for a second request:
Status code distribution:
[OK] 200 responses
What is wrong with my config? Why after an idle time have I the DeadlineExceeded desc = context deadline exceeded?