Plugin migration caused app to crash
the new migration seems to work fine for my golang app, but it causes the node.js apps to crash. how do I fix this?
25 Replies
Project ID:
N/A
N/A
did the migration process not redeploy the node app?
yes. it did, then it crashed, with error shown above
to me that looks like logs from when the migration progress stopped the service
can you redeploy your service manually?
i did.
several times actually
are you still experiencing a crash? the same signal?
yes
can you please add logging to indicate if the connection to the database was successful?
usually it will have these logs when it connects to the db successfully. but it stopped at nats server. so i doubt it connected the db
interesting
@jr - crash loop after migration progress completed
maybe something is not compatible?
oh, you do need to provide your project id, it is very much applicable
b8658160-c9b6-4c91-a5dd-dd0fefa4c270 here
its working fine locally and on golang apps
can you add a sleep in your start script?
sleep 2 && <your normal start script>
okay let's wait until jr is available
Hi @Crystal, I can help you with this. The database looks to have migrated successfully. From the above screenshot it looks like it is failing when trying to connect to Prisma. I suspect you are getting caught by the network initialization time. To debug that can we try adding a
sleep 2
before the server starts. So it the Dockerfile it could be something like sleep 2 && <start command>
This looks like it's an issue with Alpine's musl libc and dns resolution.
Can you try setting
ENABLE_ALPINE_PRIVATE_NETWORKING=1
as an envvar pls: https://docs.railway.app/reference/private-networking#workaround-for-alpine-based-imagesi added sleep 2 in both dockerfile and package.json, and tried both ENABLE_ALPINE_PRIVATE_NETWORKING=1 and ENABLE_ALPINE_PRIVATE_NETWORKING=true. its still having the same issue.
btw, i disabled the private networking in railway, so i dont think the new var does anything
Are you able to add any more logs to see where it is crashing?
i tried logging, but there's no error from the logs. but i played around and updated all dependencies, and i'm sure its an issue with the @sudoavian/prisma npm package that's being used in the app. that package contains the schema for the db
already regenerated and pushed the schema, there's no issue when doing that. so im not sure what is causing the npm error
This issue:
https://github.com/prisma/prisma/issues/17946
Fixed. Just have to use node:18-alpine3.18 in the dockerfile
GitHub
Segmentation Fault in Postgres · Issue #17946 · prisma/prisma
I am studying prisma to use it. But I haven't been able to use it since my first attemp is showing me this error. [1] 6655 segmentation fault node src/seed.js [1] 5817 segmentation fault ts-nod...
oh that is super confusing. And great to know in case it happens in the future. Glad it is working now 😄