Version ie 5.12.28-o
Environment <Docker/Shared Hosting/Zip/Other>
Checklist
- Can you replicate the issue on our v5 demo site https://demo.invoiceninja.com or Invoice Ninja?
- Have you searched existing issues?
- Have you inspected the logs in storage/logs/laravel.log for any errors?
Describe the bug
When attempting to download or view any invoice PDF from the web interface, the generation completely freezes, ultimately resulting in a 500 Internal Server Error (AxiosError: Request failed with status code 500) after exactly 30 seconds.
The underlying application logs reveal that the local SnapPDF execution is hanging/freezing indefinitely inside the TrueNAS Docker environment until hit by PHP’s maximum execution limit (Maximum execution time of 30 seconds exceeded).
Attempts to bypass this by setting environment variables like PDF_GENERATOR=hosted_ninja or QUEUE_CONNECTION inside the TrueNAS interface fail, because the application developer chart has locked/hardcoded those specific variables, triggering a template render error on deployment.
Steps To Reproduce
Host Invoice Ninja inside a TrueNAS SCALE container setup.
Log into the React web interface.
Navigate to an invoice and click Download PDF or try to preview it.
The loader spins for exactly 30 seconds before dropping a raw JSON status code 500 error on the screen.
Expected Behavior
The PDF should render and download via SnapPDF locally, or alternatively, there should be a robust way to switch to Hosted Ninja inside the React UI without the TrueNAS deployment templates crashing over locked .env keys.
Additional context
The TrueNAS template being used blocks overriding PDF_GENERATOR or QUEUE_CONNECTION via standard Docker environment variables (throws RenderError: Environment variable is already defined from the application developer).
Screenshots
Logs
{
“message”: “Request failed with status code 500”,
“name”: “AxiosError”,
“code”: “ERR_BAD_RESPONSE”,
“status”: 500,
“config”: {
“method”: “get”,
“url”: “https://invoice.razedigital.eu/client/invoice/[ID]/download_pdf”,
“responseType”: “arraybuffer”
}
}
[2026-06-07 19:36:37] laravel.WARNING: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /app/app/Services/Pdf/PdfBuilder.php on line 2170
[2026-06-07 19:37:07] production.ERROR: Maximum execution time of 30 seconds exceeded {“userId”:1,“exception”:"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Maximum execution time of 30 seconds exceeded at /app/vendor/symfony/process/Pipes/AbstractPipes.php:184)
[stacktrace]
#0 /app/vendor/laravel/octane/src/ApplicationGateway.php(36): Illuminate\Foundation\Http\Kernel\handle()
#1 /app/vendor/laravel/octane/src/Worker.php(84): Laravel\Octane\ApplicationGateway->handle()
#2 /app/vendor/laravel/octane/bin/frankenphp-worker.php(51): Laravel\Octane\Worker->handle()
#3 [internal function]: {closure:/app/vendor/laravel/octane/bin/frankenphp-worker.php:47}()
#4 /app/vendor/laravel/octane/bin/frankenphp-worker.php(72): frankenphp_handle_request()
#5 /app/public/frankenphp-worker.php(7): require(‘…’)
#6 {main}
"}