$req, 'Active' => $active, 'Reading' => $reading, 'Writing' => $writing, 'Waiting' => $waiting, ); rrdtool_update($nginx_rrd, $fields); $tags = array('name' => 'nginx', 'app_id' => $app['app_id']); influx_update($device,'app',$tags,$fields); // Unset the variables we set here unset($nginx); unset($nginx_rrd); unset($active); unset($reading); unset($writing); unset($req);