Strapi transfer using fly.io "WebSocket is not open: readyState 3 (CLOSED)"

130 Views Asked by At

Getting this issue using strapi + fly.io to do a transfer:

2023-10-02T17:29:53Z app[e784eee9a9d628] ewr [info][2023-10-02 17:29:53.310] http: GET /admin/transfer/runner/push (37 ms) 200
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]  Error [ERR_HTTP_REQUEST_TIMEOUT]: Request timeout
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]      at onRequestTimeout (node:_http_server:799:30)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]      at listOnTimeout (node:internal/timers:569:17)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]      at process.processTimers (node:internal/timers:512:7)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]/app/node_modules/ws/lib/websocket.js:1101
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    const err = new Error(
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]                ^
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]Error: WebSocket is not open: readyState 3 (CLOSED)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    at sendAfterClose (/app/node_modules/ws/lib/websocket.js:1101:17)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    at Object.send (/app/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/utils.js:146:24)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    at /app/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/utils.js:142:30
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    at Object.respond (/app/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/utils.js:118:28)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    at Object.executeAndRespond (/app/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/utils.js:172:30)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-10-02T17:30:20Z app[e784eee9a9d628] ewr [info]    at async Object.onMessage (/app/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/push.js:122:13)
1

There are 1 best solutions below

0
ThomasReggi On

My fly.toml file looked like this and I changed it:

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ["app"]

to:

[[services]]
  internal_port = 3000
  protocol = "tcp"

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20

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

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

  [[services.tcp_checks]]
    interval = 10000
    timeout = 2000