503 error because of bad coding or excessive resource usage. When your website resources (CPU, RAM and inode) hit the available limit and not get further resources to execute the query then it displays such errors.
You need to optimize your website (If any page/coding is causing this issue then remove/correct that code). It may be possible that your website is already optimized and still you are getting this error because you are getting more traffic on your website.
In that case you need to upgrade to a plan with higher resources. like presently you are using shared hosting and you are getting such errors then you can migrate to cloud hosting plans to get more server resources