0

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?

Lost
  • 12,007
  • 32
  • 121
  • 193
  • Is it hosted on Azure by chance? If so, check this post: https://stackoverflow.com/questions/33789895/how-to-prevent-an-azure-website-from-going-to-sleep – smoore4 Oct 25 '17 at 21:04
  • No its a docker container in the same machine which is AWS EC2 – Lost Oct 25 '17 at 21:08

0 Answers0