#Database errors happening randomly after update

91 messages · Page 1 of 1 (latest)

devout cargo
#

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?

sage glenBOT
#

Project ID: 6e3a9590-ec0b-4bb2-9fa9-e4cf6a9ccea7

devout cargo
#

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

tiny lantern
#

you are the second person to have this issue

devout cargo
#

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

devout cargo
#

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

tiny lantern
#

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

devout cargo
tiny lantern
devout cargo
tiny lantern
#

likely

devout cargo
#

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

#

Actually

#

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

tiny lantern
devout cargo
#

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

tiny lantern
#

then the dockerfile is going to be simple

devout cargo
#

Yeah no, It didn't run

#

At all

tiny lantern
#

be more specific please?

devout cargo
#

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

#

i rlly avoid using docker so im pretty unfamiliar with it

#

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

tiny lantern
#

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

devout cargo
#

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

#

is this correct?

tiny lantern
#

it looks correct

devout cargo
#

i'll publish to the repo and try then

#

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

#

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

#

or is that normal

#

yeah no, it didn't work

#

error still persists

#

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

tiny lantern
#

sounds good

devout cargo
#

it's still persisting... how??

tiny lantern
#

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

devout cargo
#

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

tiny lantern
#

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

devout cargo
#

alright, lets see if it works now

#

still the same error...

#

yeah Im getting tired of this

#

gonna just switch to my vps

#

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

tiny lantern
#

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

devout cargo
#

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

tiny lantern
#

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

devout cargo
#

Anyway, this is the dockerfile i came up with

#
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"]

tiny lantern
#

does the error disappear with that Dockerfile?

devout cargo
#

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

tiny lantern
#

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

devout cargo
#

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

tiny lantern
#

that's not ideal

devout cargo
#

Like I said, this error was extremely random

#

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

tiny lantern
#

the development word is crazy like that sometimes

devout cargo
#

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

tiny lantern
#

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

#

like a mismatched bun version or something

devout cargo
#

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

#

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

#

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

#
FROM oven/bun:1 as base

WORKDIR /app

COPY package.json bun.lockb ./

RUN bun install

COPY . .
#

That's the dockerfile for reference

tiny lantern
#

where is the start command being set?

devout cargo
#

Idk I still suck at docker

tiny lantern
#

haha that doesnt answer the question in the slightest

devout cargo
#

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

#

For now

tiny lantern
#

good with me

devout cargo
#

It's just the custom railway start command

#

I set it to bun run start

#

That's it

tiny lantern
#

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

devout cargo
#

I'll try that, sure

#
FROM oven/bun:1 as base

WORKDIR /app

COPY package.json bun.lockb ./

RUN bun install

COPY . .

CMD bun run start
#

Good enough?

#

Oh

#

It worked

#

Nice

tiny lantern
devout cargo
#

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