How should I find out why my website crashed?
My website made by asp.net core 5 is running on IIS now.
Yesterday night it crashed. When I access it, it reports 503 service unavailable.
I used the Nlog in it before. However, the logger doesn't log any error about it.
Here are the last log of it:
021-09-14 23:19:39.2178||DEBUG|Test.Program|init main
2021-09-14 23:19:40.1917|50|WARN|Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository|Using an in-memory repository. Keys will not be persisted to storage.
2021-09-14 23:19:40.2015|59|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
2021-09-14 23:19:40.2301|35|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|No XML encryptor configured. Key {78953b87-af35-4aa6-9f6e-31663e449b1b} may be persisted to storage in unencrypted form.
2021-09-14 23:19:47.9667||DEBUG|Test.Program|init main
2021-09-14 23:19:48.9293|50|WARN|Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository|Using an in-memory repository. Keys will not be persisted to storage.
2021-09-14 23:19:48.9293|59|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
2021-09-14 23:19:48.9680|35|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|No XML encryptor configured. Key {e5bb0b45-e316-4f47-a24b-ba38f92b7afd} may be persisted to storage in unencrypted form.
2021-09-14 23:19:49.1207|100|INFO|System.Net.Http.HttpClient.Default.LogicalHandler|Start processing HTTP request POST http://localhost:44368/api/LogSpider/
2021-09-14 23:19:49.1207|100|INFO|System.Net.Http.HttpClient.Default.ClientHandler|Sending HTTP request POST http://localhost:44368/api/LogSpider/
2021-09-14 23:19:49.2140|101|INFO|System.Net.Http.HttpClient.Default.ClientHandler|Received HTTP response headers after 88.6991ms - 200
2021-09-14 23:19:49.2140|101|INFO|System.Net.Http.HttpClient.Default.LogicalHandler|End processing HTTP request after 99.1324ms - 200
2021-09-14 23:20:00.9567||DEBUG|Test.Program|init main
2021-09-14 23:20:02.0055|50|WARN|Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository|Using an in-memory repository. Keys will not be persisted to storage.
2021-09-14 23:20:02.0155|59|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
2021-09-14 23:20:02.0490|35|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|No XML encryptor configured. Key {2ba78927-d245-467c-93d3-2f1e9f0ba52f} may be persisted to storage in unencrypted form.
2021-09-14 23:20:07.8718||DEBUG|Test.Program|init main
2021-09-14 23:20:08.8467|50|WARN|Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository|Using an in-memory repository. Keys will not be persisted to storage.
2021-09-14 23:20:08.8560|59|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
2021-09-14 23:20:08.8852|35|WARN|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|No XML encryptor configured. Key {c6e1996d-8f52-4548-85ce-5354c7f5a668} may be persisted to storage in unencrypted form.
It seems the website automatically restart several times before it finally crashed.
I ran the website locally on my computer without any error.
And also, I have deployed this site with localhost hostname on the server computer with the same Physical Path before(I added a new site on IIS for this while not just adding a hostname on the same site). The localhost site runs well.
I tried to stop and restart the site while the error was still here.
What's more, other sites on the server running well.
Finally, I stop the server on IIS and restart it, now the site runs well without the 503 error code.
I want to find out the reason why my website crashes. Could you please tell me how can I find it? Thank you.