foxdevuz's avatar

foxdevuz wrote a reply+100 XP

5mos ago

Thank you! The problem is solved.

foxdevuz's avatar

foxdevuz liked a comment+100 XP

5mos ago

I've encountered this when a page has a lot of preloadable assets. This is usually done by the AddLinkHeadersForPreloadedAssets middleware, which sends asset URLs as Link response headers. It's great for performance because the browser can start loading assets even before receiving a response body, but if the response headers get too big, the combined size can exceed the FastCGI buffer size.

You can check the response headers of any working page. If you see any Link headers, this might be the issue. You can try increasing the buffer size. Add/modify these in the http context in nginx.conf and restart Nginx:

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
foxdevuz's avatar

foxdevuz started a new conversation+100 XP

5mos ago

Hello everyone I am using Laravel with React (Inertia). I have deployed the application using nginx and it works fine, I can use it, login do some other actions and so on. But on any page other than / is giving me error. Example /admin/users if I come this page from other page (using navbar or something) It's working but once I refresh the page it's showing me 502

composer.json

package.json

nginx.conf

how can i fix it?