Hey @pascalbaljet, hope you're doing fine!
I wanted to share something that has been troubling me for a few months with Inertia. Managed to troubleshoot but still not sure what's the original "cause".
The main issue is caused by this line in app.blade.php:
that seems to exceed NGINX/FastCGI buffer limites (at least on Ploi where I deploy), which consequently returns me 502 Bad Gateway, combined with the following in my Nginx error logs.
My fix is generally to just comment this line, which doesn't seem to have that much impact on performances, but still, any idea why does it happen? Or at least, do we generally want to preload all pages?
By the way, it does not necessarily happen on new projects, but like on, let's say, medium size projects with a handful of pages (though not that many). I know I could also increase the buffer sizes, but I am not sure what's ideal and I would like to understand the source cause.
Happy to make myself available if you need to!
php
@vite([ 'resources/css/app.css', 'resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx", ])
text
upstream sent too big header while reading response header from upstream
commit ee60301
Hey! The cause is the
AddLinkHeadersForPreloadedAssets middleware in bootstrap/app.php, not the @vite directive itself. It adds every chunk the page imports to a single Link response header, which can exceed nginx's default buffer size on larger pages. You can increase…GitHubnginx header limitation · Issue #529 · inertiajs/inertia-laravelOpening this issue to aid others running into a somewhat bizarre issue, might also be cause for some documentation. When applying the @inertia directive the yielded result contains both the page te...