save heartbeat to sqlite db when no response from api