Skip to content
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

Nuxt3 RC-12 version, production deployment, using Nginx reverse proxy, becomes very slow #15313

Closed
yuanquan8 opened this issue Nov 1, 2022 · 9 comments

Comments

@yuanquan8
Copy link

Environment


  • Operating System: Linux
  • Node Version: v16.15.1
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: 0.5.4
  • Package Manager: pnpm@7.14.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -
  • Nginx version: 1.18.0

Reproduction

none

Describe the bug

Developing with RC12, deploying to production, and using the Nginx reverse proxy, the access speed becomes extremely slow (HTML takes about 5 seconds to respond, but static JS file access speed is normal) , if access directly through the port, the speed is normal. After I dropped the NUXT version to RC11, didn't have this problem

使用rc12版本进行开发,部署到生产环境,使用Nginx反向代理,访问速度变得特别慢(html需要5秒左右才能有响应,但是静态js文件访问速度是正常的),如果直接通过端口进行访问,则速度正常。我把nuxt版本降到rc11之后,就没有这个问题。

Additional context

none

Logs

none
@yuanquan8
Copy link
Author

I wonder if this is a bug in NUXT3 RC12 @antfu

@zenonux
Copy link

zenonux commented Nov 1, 2022

same issue

@yuanquan8
Copy link
Author

same issue

Did you encounter this problem too?

你也遇到这个问题了吗?

@zenonux
Copy link

zenonux commented Nov 1, 2022

same issue

Did you encounter this problem too?

你也遇到这个问题了吗?

是啊

@sewalsh
Copy link

sewalsh commented Nov 1, 2022

Try disabling Early Hints - #15268

@yuanquan8
Copy link
Author

Try disabling Early Hints - #8503 (comment)

Thank you. That solves my problem

@yuanquan8
Copy link
Author

@zenonux
This can be done by adding the following configuration
#8575

export default defineNuxtConfig({
  ...
  experimental: {
    writeEarlyHints: false,
  },
  ...
})

@jilv220
Copy link

jilv220 commented Nov 2, 2022

Same problem. The speed becomes normal again if I use port-forwarding instead.

@yuanquan8
Copy link
Author

export default defineNuxtConfig({
  ...
  experimental: {
    writeEarlyHints: false,
  },
  ...
})

You can use this configuration to solve this problem because NGINX does not support a 103 status code, but this feature is enabled by default in RC12
@jilv220

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants