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

The nginx proxy nuxt3 service is unusually slow #15328

Closed
WenisOK opened this issue Nov 2, 2022 · 2 comments
Closed

The nginx proxy nuxt3 service is unusually slow #15328

WenisOK opened this issue Nov 2, 2022 · 2 comments

Comments

@WenisOK
Copy link

WenisOK commented Nov 2, 2022

Environment


  • Operating System: Linux
  • Node Version: v18.12.0
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: 0.6.0
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

When i using nginx proxy nuxt server, the response unusually. It takes about a minute for the data to be responded.
this is nginx configure file:

user root;
worker_processes 1;
pid logs/nginx.pid;
events {
    worker_connections 1024;
}
http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    keepalive_timeout 65;
    gzip on;
    upstream nuxt3 {
        server 127.0.0.1:3000;
    }
    server {
        listen 80;
        server_name www.wjchome.cn wjchome.cn;
        return 301 https://www.wjchome.cn$request_uri;
    }
    server {
        listen 443 ssl;
        server_name www.wjchome.cn wjchome.cn;
        ssl_certificate cert/public.pem;
        ssl_certificate_key cert/private.key;
        if ($host != "www.wjchome.cn") {
            return 301 https://www.wjchome.cn$request_uri;
        }
        location / {
            proxy_pass http://nuxt3;
            proxy_redirect off;
            proxy_connect_timeout 1m;
            proxy_read_timeout 1m;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
}

Describe the bug

image

Additional context

No response

Logs

No response

@manniL
Copy link
Member

manniL commented Nov 2, 2022

Did you try disabling early hints? See also #15189

@WenisOK
Copy link
Author

WenisOK commented Nov 2, 2022

I turned off early hints according to #15189 , and now he's okay, thanks

@WenisOK WenisOK closed this as completed Nov 2, 2022
@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

3 participants