Database errors happening randomly after update

2 years ago

I updated some parts of my code, and now, out of nowhere prisma just throws the biggest error I've ever seen. I asked my friends about it and they say that Prisma isn't at fault. It says that there's a library missing but everything works well locally. Can someone shine some light on this?

89 Replies

2 years ago

6e3a9590-ec0b-4bb2-9fa9-e4cf6a9ccea7


2 years ago

Here are the logs

1243300949636681758


2 years ago

you are the second person to have this issue


2 years ago

First time I've seen something like this, and the weird part is that everything is running well locally


2 years ago

It's really odd, it just happened out of nowhere


2 years ago

I think I saw a message saying that it can't download the engines for debian


2 years ago

my recommendation to you is going to be the same as it was to them, move to a dockerfile


2 years ago

Can I see the thread and file


2 years ago

that way you won't be at the whims at nixpacks updates



2 years ago

Wait this issue is from a nixpacks update?


2 years ago

likely


2 years ago

Just like that guy I wonder what to put in my dockerfile


2 years ago

Actually


2 years ago

I think I can reuse one from my old bot (azalea) since their structure is pretty similar


2 years ago

whatever you need to successfully build and run your app


2 years ago

it's pretty simple, just tsc and a start script


2 years ago

then the dockerfile is going to be simple


2 years ago

Yeah no, It didn't run


2 years ago

At all


2 years ago

be more specific please?


2 years ago

It's not an issue with railway, it's just the way my 'managers' are divided now


2 years ago

i rlly avoid using docker so im pretty unfamiliar with it


2 years ago

is there a way to use the older version of nixpacks that doesn't have this issue?


2 years ago

yes, specify the version in a railway.json file, but a Dockerfile is gonna be the way to go tbh


2 years ago

i'd rather avoid dockerfiles as long as possible… anyway, how do I do this?


2 years ago

I want to use the previous version to this release, which would be 1.23.0 if im not wrong


2 years ago

is this correct?

1243311104533201000


2 years ago

it looks correct


2 years ago

i'll publish to the repo and try then


2 years ago

One thing I don't understand… how come that the new version was released 2 days ago but I only got the error now


2 years ago

I don't think it's working, it has published the image like 3 times


2 years ago

or is that normal


2 years ago

yeah no, it didn't work


2 years ago

error still persists


2 years ago

looks like my previous builds used nixpacks version 1.22, gonna try that


2 years ago

sounds good


2 years ago

it's still persisting… how??


2 years ago

what is, please be more specific, I can't see anything about your deployment


2 years ago

the same error, even with nixpacks 1.22.0


2 years ago

guess i'll just switch to my vps for the time being


2 years ago

so then it isn't an issue with nixpacks, do the classic delete node_modules and lock file


2 years ago

alright, lets see if it works now


2 years ago

still the same error…


2 years ago

yeah Im getting tired of this


2 years ago

gonna just switch to my vps


2 years ago

Wait hold on, now it's telling me that openssl 3.0.x isn't installed


2 years ago

I'm really not sure how a VPS is a suitable alternative to Railway


2 years ago

Because rn it's the only place where I can host my stuff without getting any errors, it's not an alternative it's a replacement till i figure out this dockerfile


2 years ago

gotcha, but you could write a Dockerfile much faster than you could to deploy something to a VPS


2 years ago

I already had everything setup from before I started using railway, I just had to git pull so everything got updated


2 years ago

Anyway, this is the dockerfile i came up with


2 years ago

FROM jarredsumner/bun:latest

WORKDIR /app

COPY package.json bun.lockb ./

RUN bun install

COPY . .

RUN tsc

RUN bun run deploy.js

CMD ["bun", "run", "dist/index.js"]

2 years ago

does the error disappear with that Dockerfile?


2 years ago

I'll test it in a bit, hopefully it does. If this doesn't either then idk what will


2 years ago

if it doesn't fix it, then it's definitely a code issue


2 years ago

My laptop died on me while I was making the file so I didn't get to try it


2 years ago

that's not ideal


2 years ago

The only thing I updated was my Logger class, and that has nothing to do with prisma


2 years ago

Like I said, this error was extremely random


2 years ago

I literally just changed the ansi color of a function, got an alert that my deployment failed, and saw that error


2 years ago

the development word is crazy like that sometimes


2 years ago

If it were something like that then it wouldn't run on a vps either, yet it did, and all I had to do was just git pull to update, and fill in the env file. Plus the other person who got this didn't experience it after a database update in his code… so it doesn't make much sense for it to be a code issue


2 years ago

okay fair, if it doesn't fix it, then it's definitely a config issue


2 years ago

like a mismatched bun version or something


2 years ago

I seem to have fixed it with a simple image, although idk how much of a solution this is


2 years ago

I set the custom start command to bun run start, which is sleep 3 && bun x prisma db push && tsc && bun run deploy && bun run dist/index.js


2 years ago

Idk how much of an actual solution this is but it seems to be working


2 years ago

FROM oven/bun:1 as base

WORKDIR /app

COPY package.json bun.lockb ./

RUN bun install

COPY . .

2 years ago

That's the dockerfile for reference


2 years ago

where is the start command being set?


2 years ago

After the image is published, basically to sdout if I'm not wrong


2 years ago

Idk I still suck at docker


2 years ago

haha that doesnt answer the question in the slightest


2 years ago

Yeah sorry, I honestly have no idea what I did there, but it works and Ig that's a win


2 years ago

For now


2 years ago

good with me


2 years ago

It's just the custom railway start command


2 years ago

I set it to bun run start


2 years ago

That's it


2 years ago

but if i where you id set the start command in a CMD line in the dockerfile instead of the service settings


2 years ago

I'll try that, sure


2 years ago

FROM oven/bun:1 as base

WORKDIR /app

COPY package.json bun.lockb ./

RUN bun install

COPY . .

CMD bun run start

2 years ago

Good enough?


2 years ago

Oh


2 years ago

It worked


2 years ago

Nice


2 years ago

now if you are feeling up for it, read this and implement the suggested changes


2 years ago

Maybe another time, I'm js happy it works for now


Loading...