added a api status check before overloading mysql database on server restart