We are in a restful environment and details of our environment looks like following:
WebAPI2, Docker, .net Core. Now, there is a weird problem with the service. It is a self-hosted service
It actually run fine all the time except if it is sitting idle for a long time then the first call to the service fails with Http 400
Not sure if this is related or not but I do see similar behavior when I Postman to the service from the browser and make the first call, it fails with HTTP 500
(A little different than what we see from web Client which returns 400)
But the bottom line remains same that the first call fails all the times
Now, the thing is that all the subsequent requests are all OK except the first one. Which makes me think that it must me something to do with idle sitting service but I do not know which component in the stack in cause it. also, How to stop it from behaving this way. Can I be because it is a self-hosted service?