Shutdown service after a limit of 5 seconds has been reached.