|
|
@@ -119,6 +119,7 @@ class ExamPdfExportService
|
|
|
'--headless',
|
|
|
'--disable-gpu',
|
|
|
'--no-sandbox',
|
|
|
+ '--disable-dev-shm-usage', // 避免容器内 /dev/shm 过小导致崩溃
|
|
|
'--print-to-pdf=' . $tmpPdf,
|
|
|
'--print-to-pdf-no-header',
|
|
|
'--allow-file-access-from-files',
|
|
|
@@ -129,6 +130,8 @@ class ExamPdfExportService
|
|
|
|
|
|
if (!$process->isSuccessful() || !file_exists($tmpPdf)) {
|
|
|
Log::error('ExamPdfExportService: Chrome 渲染失败', [
|
|
|
+ 'cmd' => implode(' ', $process->getCommandLine()),
|
|
|
+ 'exit_code' => $process->getExitCode(),
|
|
|
'error' => $process->getErrorOutput(),
|
|
|
'output' => $process->getOutput(),
|
|
|
]);
|