2 years ago
Hello everybody,
Since a month we have a issue with one specific service within our production environment. After the first request the deployed instance crashes.
The instance is "just" a Java (Spring) application living inside a Docker container. The codebase as the corresponding Dockerfile didn't
changed.
FROM maven:3-amazoncorretto-21 AS build
COPY . /home/app
RUN mvn -f /home/app/pom.xml clean package
FROM amazoncorretto:21
COPY --from=build /home/app/bot/target/bot-1.0.0-SNAPSHOT.jar /usr/local/lib/stage.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/usr/local/lib/stage.jar", "--spring.profiles.active=prod"]The railway.json file:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE"
}
}15 Replies
2 years ago
have you pointed the domain to the correct port?
2 years ago
please send the domain in question
2 years ago
application failed to respond means your application failed to respond.
please check that you are listening on the host 0.0.0.0 and your domain is pointing to the correct port.
We checked. Nothing changed in the configuration. The application listens to 0.0.0.0 and points to :8080.
Also the instance crashes without any error in the Observability log.
2 years ago
if it's crashing without any logs that means your application is not logging anything
It should 😄 And it has before^^ Was there any changes to how docker builds are treated?
2 years ago
there has not been, this would be an application level issue, as long as your application prints logs unbuffered to stdout / stderr you will see them in the deploys logs
Yes, that was the case two weeks ago. It is even possible to run the docker container locally.
Could there be something else that we miss in the railway configuration?
2 years ago
yes that possible, I would focus on adding more verbose logging so you can find out why your application is crashing
2 years ago
sorry i couldn't give you the answer, but railway doesn’t have any more observability into what your code does or doesn’t do than you would.