使用使用nginx代理webman 目前導(dǎo)出6W數(shù)據(jù)沒問題超出8W數(shù)據(jù)后則報(bào)錯(cuò)502
//導(dǎo)出
public function exlCsv($queryResult, $heade)
{
ini_set('memory_limit', '800M');
ini_set('max_execution_time', '500');
//獲取頭部
$headeList = $this->forHeader($heade);
//獲取內(nèi)容
$body = $this->forBody($queryResult);
$headeList .= "\n" . $body;
//下載csv的文件名
$fileName = '公共導(dǎo)出' . date('Y-m-d H:i:s') . '.csv';
//打開php數(shù)據(jù)輸入緩沖區(qū)
ob_start();
echo $headeList;
$xlsData = ob_get_clean();
$response = response();
$response->header('Content-type', 'text/html;charset=utf-8');
$response->header('Content-type', 'text/csv');
$response->header('Content-Disposition', 'attachment;filename=' . $fileName);
$response->header('Cache-Control', 'must-revalidate,post-check=0,pre-check=0');
$response->header('Expires', '0');
$response->header('Pragma', 'public');
$response->header('Connection', 'Keep-Alive');
$response->withBody($xlsData);
return $response;
}
502 Bad Gateway
nginx
webman版本
php版本號(hào) 運(yùn)行環(huán)境linux
代理配置