New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nginx in rc.12 no more proxy_pass infinity loading #15189
Comments
These This seems to have started with this commit (nuxt/framework@5a2616c) that added support for early hint rendering (status code 103). Note the header differences between a direct connection to the nitro server versus an nginx # =========== direct nitro connection ===========
levi@Levi-PC:~/Code/gh/nuxt-rc-13-app$ curl -s -D - -o /dev/null http://localhost:3000
HTTP/1.1 103 Early Hints
Link: </_nuxt/entry.41705590.js>; rel="modulepreload"; as="script"; crossorigin, </_nuxt/error-component.3ac342b2.js>; rel="prefetch"; as="script"; crossorigin
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
X-Powered-By: Nuxt
Server-Timing: -;dur=0;desc="Generate"
Date: Wed, 19 Oct 2022 09:21:06 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 702
# =========== nginx proxy_pass ===========
levi@Levi-PC:~/Code/gh/nuxt-rc-13-app$ curl -s -D - -o /dev/null http://localhost
HTTP/1.1 103 Early Hints
Server: nginx/1.18.0 (Ubuntu)
Date: Wed, 19 Oct 2022 09:20:57 GMT
Connection: keep-alive
Link: </_nuxt/entry.41705590.js>; rel="modulepreload"; as="script"; crossorigin, </_nuxt/error-component.3ac342b2.js>; rel="prefetch"; as="script"; crossorigin
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
X-Powered-By: Nuxt
Server-Timing: -;dur=0;desc="Generate"
Date: Wed, 19 Oct 2022 09:20:57 GMT
Connection: close
^C I'm sure there's an ideal export default defineNuxtConfig({
...
experimental: {
writeEarlyHints: false,
},
...
}) |
I can confirm my simple nginx deployments are also breaking. very basic nginx conf
error in logs
|
We are unable to make Nginx work with early hints. Either we disable nginx http2 (which would disable early hints anyway) or disable it in nuxt config via We keep getting error |
Since link header would be large, proxy buffers should be increased or disable buffering all together. There is however some other issue too. |
+1 |
We are experiencing the same issue - our Nginx config with proxy is broken as well. Ended up with disabling the early hints |
Can confirm as well. Disabling it worked. |
I was having the same issue when deploying to kubernetes with a nginx-ingress. Kept getting Disabling |
It worked for me too |
@danielroe It might be a good point to add recommended settings for Nginx (proxy) to the documentation. |
Omg ! I was stucked all this afternoon with a very long first loading of my app (more than 60s) in production since i've update my dependencies (and many code). You may save my life 😱. I hope this fix works, I'll try this Monday 🤞 |
I think the correct way to solve this is to have Nginx set to accept |
I am unable to make Nginx (with http2) work with rc12. My config has |
Do you increase your proxy buffers? |
@manniL Yes and I also tried disabling buffering all together. Below is simplofied version of config I am using.
|
Thanks for this workaround, took me a few days to debug my app |
After the last research, Nginx probably doesn't support 103 early hints at all. It is therefore necessary to disable them in nuxt.config. |
When the service is running as a container in AWS ECS, health checks in the target group do not seem to support 103. I hope it helps if someone encounters the same problem. |
@pi0 So are we defaulting this experiment to true still? Isn't NGINX sort of industry standard for people who don't use al this fancy providers like Vercel etc? |
No, it was turned off by default via nuxt/framework#8486 |
@manniL ah thanks, thats good. I was looking at https://github.com/misaon/framework/commit/f3b6c8e81d5c26b38fe6d2df9949510014db06ea this one and assumed that meant default true. |
Environment
Linux
v16.13.0
3.0.0-rc.12
0.6.0
npm@8.15.1
vite
modules
,vue
,runtimeConfig
,css
,buildModules
,build
@nuxtjs/tailwindcss@5.3.5
@pinia/nuxt@0.4.3
Reproduction
params
Describe the bug
infinity loading.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: