R
Railway

✋|help

Experiencing crash with no output for the reason of the crash.

Pprince2k39/13/2023
Hello, I'm having issues with my project that I'm working on. I'm trying to test uploading some data with images along side it. I have created a batch operation in the app to help upload starting data. But when I try to do the operation it would stop after some time during it and silently redeploy. I think it is crashing. I can't really tell. The logs doesn't show any crash like errors. My question is.... How can I diagnose what is happening? or Can someone help me understand why I'm experiencing this issue.


Project ID: 3c020ff0-4c00-4de7-8338-26cc7fd992c1
BBrody9/13/2023
what makes you think the service was redeployed
it would stop after some time
can you please be more specfic?
Pprince2k39/13/2023
I'm sorry if I wasn't specific enough. Want I meant was during the upload process the progress would get up to 10 to 25 percent and the fail. So it was random percentage on the app when I received the error message. on the server side I wouldn't really get an error message to know what is happening. (I added a screenshot of the log).
Pprince2k39/13/2023
I think it is redeploying because it re outputting my api routes. These only output at launch of the app.
BBrody9/13/2023
that's not a redeploy, it's an automatic restart from railway
Pprince2k39/13/2023
ah restart my bad on the term
BBrody9/13/2023
can you tell me how long your upload requests last before the service crashes?
Pprince2k39/13/2023
8 to 10 seconds
I'm uploading 10 markdown files with an image that's about 3mb for each of them
BBrody9/13/2023
for context I asked for a specific time since railway has a 5 minute limit on POST requests
but 10 seconds is obviously no where near 5 minutes
Pprince2k39/13/2023
correct
BBrody9/13/2023
I don't really know what to tell you here, at first glance all signs so far point to a code issue
Pprince2k39/13/2023
Thats what I'm thinking ....I've tested locally and everything works fine...I was just trying to figure out how to get an error message or a stack trace. I've opened up the same questions for the server framework I'm using to see if there is answer on how to get more verbose information.
Just looking in all places to see where I can get help on the issuee
BBrody9/13/2023
what's language and framework is this? I don't think you've said?
Pprince2k39/13/2023
Vapor/Swift
BBrody9/13/2023
what version of swift are you using locally
Pprince2k39/13/2023
5.8
BBrody9/13/2023
railway uses 5.4.2 and that's the highest it natively goes
could be incompatibilities between the version of vapor you are using and swift 5.4.2
Pprince2k39/13/2023
Does the version matter with Docker?
BBrody9/13/2023
I'm not saying this is the issue, it's just something to consider
Pprince2k39/13/2023
Definitely! I'll look into that as well
BBrody9/13/2023
install swift 5.4.2 locally and do the same things you did to crash the railway service
Pprince2k39/13/2023
That actually looks like that best place to start. I'll give this a look more intensely. Thanks!
BBrody9/13/2023
no problem, let me know how it goes!
Pprince2k39/13/2023
Will do! I found a thread on the Vapor discord talking about the 5.4.2 and some Nix pack thing
I haven't finished reading it
Would it be a feature request to get the swift version updated from Nix the link with the code SwiftProvider.rs, pointed out by someone from the channel, shows that it can support up to 5.8.
BBrody9/13/2023
interesting it looks like you may be able to use 5.8 yourself
is your local version 5.8, or is there another decimal?
like a 5.8.1
Pprince2k39/13/2023
just 5.8
but I'm referencing that in the Package.swift file
I think I'll need to make a .swift-version file
BBrody9/13/2023
add this as a nixpacks.toml file to your project, this should in theory get nixpacks to use swift 5.8
[phases.setup]
    nixpkgsArchive = '976fa3369d722e76f37c77493d99829540d43845'

and if it is as simple as this, it wouldn't hurt to open a #🤗|feedback thread asking for versions higher than 5.4.2 to be supported
Pprince2k39/13/2023
Alright!
Giving this a try and then I'll make a feedback too
BBrody9/13/2023
sounds good
Pprince2k39/13/2023
Following up here. Turns out the Dockerfile installs Swift 5.8 and that is working fine. I’ve been able to use the other api endpoints I have with no issues. The issue was just that one endpoint which I was able to figure out a way to get the error/reason it fails.


Recap ...
* If you are using Dockerfile to deploy, it should use the version of Swift within it if you have it building the toolchain.
* If not using Dockerfile, natively Swift 5.4.2 is supported.
* If Swift version is not the issues. Check the code and make sure Error handling logs the error or returns the error to your client.
BBrody9/13/2023
what dockerfile?
Pprince2k39/14/2023
Attached is the Dockerfile Vapor generates
Pprince2k39/14/2023
Are you seeing that message I posted?
Discord thru an error like it didn't upload my message with the Dockerfile
BBrody9/14/2023
if you're using your own dockerfile nixpacks doesn't come into play at all
Pprince2k39/14/2023
Yeah I was able to see that things were still working when deployed and the other API endpoints still functioned.
Plus I think the build should have failed otherwise before being deployed
BBrody9/14/2023
well now I'm back to this being a code issue
Pprince2k39/14/2023
It is ... I was able to get the error message from a small code update I added
Still ...I appreciate the help and the fast response
BBrody9/14/2023
I hope you find a solution!

Looking for more? Join the community!

Recommended Posts
Railway StrapiHi. It's taken me entire day and I think I am getting close. I deployed Strapi with postgres on RailLogs down?I haven't been able to see any logs, deploy or build or observability for the past 15 minDeploy from Gitlab failsI am getting the error: error sending request for url (https://backboard.railway-develop.app/graphRailway Github ActionHey i followed the blog online and am trying to deploy my railway app under a `backend/` directory iBuild slowHi, ive pushed some updates to my sveltekit app that makes my buildtime about 4 minutes for some reaIssue Deploying Laravel PHPHello, i'm trying to deploy an already existing project made in PHP, using Laravel, and i'm trying tCustom domain not showing CNameHi! Just wanted to deploy our main app to Railway but when adding a custom domain it shows an error custom domain via googleHi! I am trying to deploy to a custom domain managed by google, and saw a bunch of posts about issueenvironments are linked together?I've two environments, production and development. If I delete one service in development, it shoulDeployment stuck at building phaseDeployments are stuck at #3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1693872Outbound traffic to Google Pub/Sub limitedProject id: bc848a89-1faa-4b26-af86-58c13f7a2e99 I am using using google pub/sub with pull subscripAccessing secret env variables during build step```toml [variables] GOPRIVATE="github.com/stroomnetwork" STROOM_REPOS_ACCESS_KEY="ghp_THIS is Secretidle cron job resource usuageim playing around with cron jobs, and they seem to be using around 200mb of ram idly even when not rMixed Content error: HTTP vs. HTTPSI have a Railway/React/Vite frontend accessing a Railway/Fastapi backend, and my frontend receives tDeployment fails when pulling nixpack imageDeployments are failing on this internal build step: #3 [internal] load metadata for ghcr.io/railwayUnable to find PostgreSQL client librarySetting up a Rails + Postgres app but deployment is failing due to an "Unable to find PostgreSQL cliInactive deployment stuck in "waiting"I have an old deployment stuck in a "waiting" status. I was doing some empty commit on my github repLogs not showingAre there problems with the logs? In all my projects logs have stopped showing since ``Sep 12 12:32Trouble unlinking DiscordTrying to unlink discord so that I can link another account, but its not letting me disconnect the cpostgres db service not accessible from my clientThis morning, the DB refuses to accept connections and when I checked the logs, I saw this: does thi