System Information
- Strapi Version: 4.3.3
- Database: PostgreSQL
- Node Version: 16.17.0
- NPM Version: 8.11.0
I have Strapi deployed on Railway with the developer plan and after periods of inactivity, I get 401 errors when trying to hit my API endpoint or my admin panel. I’m testing with Railway to make sure it compares to my paid Heroku dynos/db. Does anyone have experience with this same issue? Railway’s developer pricing states: “Unlimited execution time. Deploys remain online indefinitely”.
I’ve asked for help on Strapi and Railway’s discords. The only response I’ve received from someone at Railway was that this is a Strapi error without any other help or suggestions:
Angelo — 08/30/2022
This is an error with Strapi to my experience.
Cooper — 08/28/2022
Seen this before with Strapi so would hazard this isn’t an issue with us
Some of the logs I’m seeing on Railway:
[2022-08-30 14:18:47.691] http: GET /api/locations (16 ms) 401
Connection Error: Connection ended unexpectedly
[2022-08-30 14:18:56.505] http: GET /api/locations (5 ms) 401
Connection Error: Connection ended unexpectedly
[2022-08-30 14:18:57.689] http: GET /api/locations (62 ms) 200
[2022-09-01 03:49:40.132] debug: ⛔️ Server wasn't able to start properly.
[2022-09-01 03:49:40.132] error: select "t0"."id" from "admin_users" as "t0" limit $1 - Connection terminated unexpectedly
Error: select "t0"."id" from "admin_users" as "t0" limit $1 - Connection terminated unexpectedly
at Connection.<anonymous> (/app/node_modules/pg/lib/client.js:132:73)
at Object.onceWrapper (node:events:627:28)
at Connection.emit (node:events:513:28)
at Connection.emit (node:domain:489:12)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:57:12)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:489:12)
at TCP.<anonymous> (node:net:757:14)