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
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
8 months ago
What does your file structure looks like? I’ll see if I can reproduce this
│ 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.pyc8 months ago
I didn't try it yet! Will do later this day
8 months ago
Could u try with a Dockerfile?
its working now but it might be only temporary, i will wait atleast 4 hours to see if it will crash again or not
8 months ago
It is using railpack, not a Dockerfile as stated there
8 months ago
and I wonder why it is showing ./ as your app content
8 months ago
did u set any root path related env var or do you have your files in a subdir?
No I didn't set any path related var, and I have my files in root in my github repository
8 months ago
finishing some things, will try to reproduce this
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

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
8 months ago
if you could remove every deploy and disable serverless
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?

8 months ago
Yep, that's it
8 months ago
I forgot that serverless can't run cron jobs, my bad this conversation would've been shorter lol.
8 months ago
Just some extra info before I raise this to the team, you created the project while u were at trial?
8 months ago
And now ur in the free plan
8 months ago
Ok, thanks
8 months ago
!t
8 months ago
@YTangeldog2145 - how did you set a cron schedule?
8 months ago
This thread has been escalated to the Railway team.
Status changed to Awaiting Railway Response medim • 9 months ago
8 months ago
ah i see
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.
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?
8 months ago
yes, but at that point just get hobby 😆
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 ¯_(ツ)_/¯
8 months ago
fair enough
