sudden build failed errors (again)
ahmedkmh
FREEOP

8 months 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

medim
MODERATOR

8 months ago

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


ahmedkmh
FREEOP

8 months ago

yeah


ahmedkmh
FREEOP

8 months ago

i have both


ahmedkmh
FREEOP

8 months ago

It happened again


medim
MODERATOR

8 months ago

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


ahmedkmh
FREEOP

8 months 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

8 months ago

Is there any updates?


medim
MODERATOR

8 months ago

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


medim
MODERATOR

8 months ago

Could u try with a Dockerfile?


ahmedkmh
FREEOP

8 months ago

i have no experience with Dockerfiles but i will try


ahmedkmh
FREEOP

8 months 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

8 months ago

just crashed again

1377392446077403100


medim
MODERATOR

8 months ago

It is using railpack, not a Dockerfile as stated there


medim
MODERATOR

8 months ago

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


medim
MODERATOR

8 months ago

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


ahmedkmh
FREEOP

8 months ago

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


medim
MODERATOR

8 months ago

finishing some things, will try to reproduce this


ahmedkmh
FREEOP

8 months 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


medim
MODERATOR

8 months 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


medim
MODERATOR

8 months ago

if you could remove every deploy and disable serverless


ahmedkmh
FREEOP

8 months ago

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


ahmedkmh
FREEOP

8 months 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


medim
MODERATOR

8 months ago

Yep, that's it


medim
MODERATOR

8 months ago

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


ahmedkmh
FREEOP

8 months ago

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


medim
MODERATOR

8 months ago

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


ahmedkmh
FREEOP

8 months ago

yeah


medim
MODERATOR

8 months ago

And now ur in the free plan


ahmedkmh
FREEOP

8 months ago

yea


medim
MODERATOR

8 months ago

Ok, thanks


medim
MODERATOR

8 months ago

!t


brody
EMPLOYEE

8 months ago

@YTangeldog2145 - how did you set a cron schedule?


medim
MODERATOR

8 months ago

This thread has been escalated to the Railway team.

Status changed to Awaiting Railway Response medim 9 months ago


ahmedkmh
FREEOP

8 months ago

from the project's setting while i was in trial


brody
EMPLOYEE

8 months ago

ah i see


brody
EMPLOYEE

8 months 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

8 months 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?


brody
EMPLOYEE

8 months ago

yes, but at that point just get hobby 😆


ahmedkmh
FREEOP

8 months 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 ¯_(ツ)_/¯


brody
EMPLOYEE

8 months ago

fair enough


Loading...