Rust app failing on Railway Metal
carllippert
HOBBYOP

a year ago

Using a dockerfile to deploy to railway and when automigrated to metal my app started no longer running consistantly.

Using lots of tokio.

Project Id
22768473-1e2a-4436-9f22-162da0cd1123

Dockerfile

FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef

# Create and change to the app directory.
WORKDIR /app

FROM chef AS planner
COPY . ./
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder 
COPY --from=planner /app/recipe.json recipe.json

# Build dependencies - this is the caching Docker layer!
RUN cargo chef cook --release --recipe-path recipe.json

# Build application
COPY . ./
RUN cargo build --release

CMD ["./target/release/anything-server"]


EXPOSE 3001

honestly have had better experience using nixpacks but it failed when i added deno as dep and could not find path to build that way.

All code is opensource if interested to look deeper
https://github.com/tryanything-ai/anything

Need a way to for not prevent metal deploy when it auto deploys from github.

Solved

7 Replies

brody
EMPLOYEE

a year ago

can you explain what is failing exactly?


carllippert
HOBBYOP

a year ago

forsure.

Basically the application uses lots of MPSC message passing to spawned tokio proceses.

Purrs like a kitty on my mac. Had never had any issues before.

Then get moved to metal than essentially everything grinded to a halt.

No error messages just like everything getting dropped.

Not smart enough with this system to really know ho w to diagnose that in production.

No error logs just stuff dropping.

Is there any details on what is different between the two environments?


brody
EMPLOYEE

a year ago

are you saying that it works on GCP?


carllippert
HOBBYOP

a year ago

no idea. Is that what "old railway" is on?

then yes.


carllippert
HOBBYOP

a year ago

for now is there any way to prevent deploying to MEtal and force oregon until we can figure out a more quality fix?


brody
EMPLOYEE

a year ago

that would be limited to Pro for now


brody
EMPLOYEE

10 months ago

!s


Status changed to Solved brody 11 months ago


Loading...