i am facing health point issue can someone help me
yash-povie
PROOP

2 months ago

[Region: us-east4]

==============

Using Nixpacks

==============

context: v507-ehdU

╔══════════════════════════════ Nixpacks v1.38.0 ══════════════════════════════╗

║ setup │ python311, gcc ║

║──────────────────────────────────────────────────────────────────────────────║

║ install │ python -m venv --copies /opt/venv && . /opt/venv/bin/activate ║

║ │ && pip install -r requirements.txt ║

║──────────────────────────────────────────────────────────────────────────────║

║ start │ python main.py

╚══════════════════════════════════════════════════════════════════════════════╝

internal

load build definition from Dockerfile

0ms

internal

load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1745885067

108ms

internal

load .dockerignore

0ms

stage-0

FROM ghcr.io/railwayapp/nixpacks:ubuntu-1745885067@sha256:d45c89d80e13d7ad0fd555b5130f22a866d9dd10e861f589932303ef2314c7de

12ms

internal

load build context

0ms

stage-0

WORKDIR /app/ cached

0ms

stage-0

COPY .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix

100ms

stage-0

RUN nix-env -if .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix && nix-collect-garbage -d

35s

23 store paths deleted, 245.31 MiB freed

stage-0

COPY . /app/.

142ms

stage-0

RUN python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

8s

Successfully installed annotated-types-0.7.0 anyio-3.7.1 cffi-2.0.0 click-8.3.0 cryptography-46.0.2 ecdsa-0.19.1 fastapi-0.104.1 h11-0.16.0 httptools-0.6.4 idna-3.10 pyasn1-0.6.1 pycparser-2.23 pydantic-2.5.0 pydantic-core-2.14.1 python-dotenv-1.0.0 python-jose-3.3.0 python-multipart-0.0.6 pyyaml-6.0.3 rsa-4.9.1 six-1.17.0 sniffio-1.3.1 starlette-0.27.0 typing-extensions-4.15.0 uvicorn-0.24.0 uvloop-0.21.0 watchfiles-1.1.0 websockets-15.0.1

stage-0

RUN printf '\nPATH=/opt/venv/bin:$PATH' >> /root/.profile

124ms

stage-0

COPY . /app

15ms

auth

sharing credentials for production-us-east4-eqdc4a.railway-registry.com

0ms

=== Successfully Built! ===

Run:

docker run -it production-us-east4-eqdc4a.railway-registry.com/eb3f9030-1901-4702-b8bc-445a75e18c2d:99c45b2d-e1d7-44d0-8cb0-b7f61d27456e

Build time: 85.81 seconds

==================== Starting Healthcheck ====================

Path: /api/health

Retry window: 1m0s

Attempt #1 failed with service unavailable. Continuing to retry for 49s

Attempt #2 failed with service unavailable. Continuing to retry for 48s

Attempt #3 failed with service unavailable. Continuing to retry for 46s

Attempt #4 failed with service unavailable. Continuing to retry for 42s

Attempt #5 failed with service unavailable. Continuing to retry for 34s

Attempt #6 failed with service unavailable. Continuing to retry for 18s

1/1 replicas never became healthy!

Healthcheck failed!

$10 Bounty

6 Replies

Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Anonymous
FREE

2 months ago

Dgkfvjkl


uxuz
MODERATOR

2 months ago

Hey, have you specified a PORT variable? Additionally, I see that your start command is just python main.py, perhaps you would want to use something like hypercorn or uvicorn, as this is also listed and installed from your requirements.txt? Railway also has a dedicated documentation page for deploying FastAPI which may help you set everything up correctly.


yash-povie
PROOP

2 months ago

tried it out set it to 3000but it just keep geting denied can u please help

Attachments


uxuz

Hey, have you specified a PORT variable? Additionally, I see that your start command is just python main.py, perhaps you would want to use something like hypercorn or uvicorn, as this is also listed and installed from your requirements.txt? Railway also has a dedicated documentation page for deploying FastAPI which may help you set everything up correctly.

yash-povie
PROOP

2 months ago

no it didnt work please help


yash-povie

no it didnt work please help

Can you share the portion where you bind in your main.py file? I believe you need to set host=None.

Also, please confirm that your healthcheck works on your local machine.


Loading...