Craigt
Craigt

Reputation: 3580

ASP.NET Core app crashing

I'm running an ASP.NET Core app on kestrel in a docker container on AWS. When first running the container everything works well. Some time later (minutes) the site will stop working. At this point my docker container is no longer running.

I suspect that the resulting process of dotnet MyWebsite.dll crashes which causes the container to stop running as well.

I have inspected the container logs using docker-compose logs but see no exceptions or errors at all.

Does Kestrel have its own log files somewhere that I could inspect? Anything else I could take a look at to try and get this problem resolved?

Upvotes: 2

Views: 1264

Answers (1)

Pradeep Kumar
Pradeep Kumar

Reputation: 1349

You can look at the console logs of your application using the command

docker logs [OPTIONS] CONTAINER

where CONTAINER is the name of your docker container. Refer to docker logs documentation

Hopefully, you will be able to see the exception which caused your application to crash/exit.

Upvotes: 1

Related Questions