sudden build failed errors (again)
ahmedkmh
FREEOP

a year ago

i already reported this one before in https://station.railway.com/questions/sudden-build-failed-errors-cc4be8e5 and https://discord.com/channels/713503345364697088/1373284678173462689

and i thought i fixed it at first (by changing from nixpacks to railpacks) but it happened again, for a bit more context my project is a python file that uses railway's cronjob system to run the code every 15 minutes, suddenly at random time without any involvement from me, i get spammed with build failed errors (i got around 40 emails saying build failed while i was asleep), i realized that redeploying the original deployment only fixes it temporarily, so i want to know what causes this issue?

name: brave-embarce
id: 6bf56526-ebe4-41fa-ac7f-573821bcbf55

39 Replies

a year ago

Hi! Do you have a main.py file or a requirements.txt file on the root path?
https://railpack.com/languages/python/#detection


ahmedkmh
FREEOP

a year ago

yeah


ahmedkmh
FREEOP

a year ago

i have both


ahmedkmh
FREEOP

a year ago

It happened again


a year ago

What does your file structure looks like? I’ll see if I can reproduce this


ahmedkmh
FREEOP

a year ago

│   checker.py
│   content_title.py
│   main.py
│   README.md
│   requirements.txt
│   subs.py
│   sub_list.txt
│
├───data
│       CS.json
│       CT.json
│       DS.json
│       EN.json
│       EN2.json
│       ETH.json
│       IS.json
│       LD.json
│       Math.json
│       PHY.json
│       PL.json
│       SC.json
│       Static.json
│
├───images
│       logo.png
│       screenshot.png
│
├───prev-data
│       CS.json
│       CT.json
│       DS.json
│       EN.json
│       EN2.json
│       ETH.json
│       IS.json
│       LD.json
│       Math.json
│       PHY.json
│       PL.json
│       SC.json
│       Static.json
│
└───__pycache__
        checker.cpython-313.pyc
        content_title.cpython-313.pyc

ahmedkmh
FREEOP

a year ago

Is there any updates?


a year ago

I didn't try it yet! Will do later this day


a year ago

Could u try with a Dockerfile?


ahmedkmh
FREEOP

a year ago

i have no experience with Dockerfiles but i will try


ahmedkmh
FREEOP

a year ago

its working now but it might be only temporary, i will wait atleast 4 hours to see if it will crash again or not


ahmedkmh
FREEOP

a year ago

just crashed again

1377392446077403100


a year ago

It is using railpack, not a Dockerfile as stated there


a year ago

and I wonder why it is showing ./ as your app content


a year ago

did u set any root path related env var or do you have your files in a subdir?


ahmedkmh
FREEOP

a year ago

No I didn't set any path related var, and I have my files in root in my github repository


a year ago

finishing some things, will try to reproduce this


ahmedkmh
FREEOP

a year ago

I don't if that's normal or not but whenever that issue happens it for some reason makes the orignal deployment sleeping and then makes another deployment that always makes build failed errors

1377393879342649300


a year ago

Could not reproduce this in any way and this randomness of runs that deploy successfully and others that just fail on build tell me it's something else


a year ago

if you could remove every deploy and disable serverless


ahmedkmh
FREEOP

a year ago

Well… I am free tier so I can't disable serverless


ahmedkmh
FREEOP

a year ago

i think i have found the issue and it looks like a bug in railway's side?

apparently i shouldn't be able to make cronjobs in the first place because my project is forced to be serverless but somehow my project still have it, so it tries to run a cronjob when the deployment is sleeping which causes all that build errors?

1377405765207330800


a year ago

Yep, that's it


a year ago

I forgot that serverless can't run cron jobs, my bad this conversation would've been shorter lol.


ahmedkmh
FREEOP

a year ago

nah its my bad too, i should have noticed it sooner lol


a year ago

Just some extra info before I raise this to the team, you created the project while u were at trial?


ahmedkmh
FREEOP

a year ago

yeah


a year ago

And now ur in the free plan


ahmedkmh
FREEOP

a year ago

yea


a year ago

Ok, thanks


a year ago

!t


a year ago

@YTangeldog2145 - how did you set a cron schedule?


a year ago

This thread has been escalated to the Railway team.

Status changed to Awaiting Railway Response medim 11 months ago


ahmedkmh
FREEOP

a year ago

from the project's setting while i was in trial


a year ago

ah i see


a year ago

so you will need to be on a paid plan to do any kind of CRON going forward, CRONs of any kind be that native platform CRONs or in-code CRONs or jobs are not going to work with serverless.


ahmedkmh
FREEOP

a year ago

i see, well what if i made a fastapi project that waits for requests to run the code (serverless projects can wake up when recieving requests right?) from an external website called https://cron-job.org/en/, will that be ok?


a year ago

yes, but at that point just get hobby 😆


ahmedkmh
FREEOP

a year ago

well 5 dollars in my country is alot and its hard to pay that per month(also feels like a waste to pay that when my project only takes less than a dollar per month), and even if i can there is also the issue with getting a payment method that works internationally as its harder to get those

and i am only an unemployed student after all ¯_(ツ)_/¯


a year ago

fair enough


Welcome!

Sign in to your Railway account to join the conversation.

Loading...