Close mysqli connections in api scripts.