If your server is having an issue and it should return 503 error code.But if it’s not returning 503 error then Google automatically count in 404 error and remove it from search engine indexing.
John Mueller of Google responded to a complaint on Twitter defending why Google removed a site that was serving up 503 errors.
Your site was gone for over 2 months. We’re patient, but users are going to blame us for leading them there.If a site is down for a couple of weeks, I think most users would assume that it’s gone for good. 503 or not….
Read Case study on this here