LoginSignup
0
0

More than 1 year has passed since last update.

nginx,laravel,vue3,gcp を aws で使うと激重

Posted at

結論から言えば

・ドメインの設定ミス
・nginxの設定ミス

まずはドメインの設定ミス

参考
https://teratail.com/questions/44231

症状はこの方と一緒
https://qiita.com/mako0104/questions/f655206741c14a77ada8

chromeツールで app と表示するだけなのに21.56秒もかかっている

3a.png

原因 Aレコード、twikon.clubに複数のIPアドレスが設定されている

1a.png

これがあると、ドメインのネーム解決に時間がかかって激重になるので、
正しいIPアドレスのみ入力すること。

また、AAAAレコードも正しいのに変更。

nginxの設定 gcp を使う

nginxのエラーログに以下の表記が

2022/11/14 14:04:44 [warn] 10748#10748: *5502 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/8/06/0000000068 while reading upstream, client: 49.105.92.152, server: twikon.club, request: "GET /gcp-storage/photo-300x300-51610.jpg HTTP/2.0", upstream: "https://142.250.196.112:443/twikon/photo-300x300-51610.jpg", host: "twikon.club", referrer: "https://twikon.club/user-show"
default.conf

//最上部に以下を追記
proxy_buffering on;
proxy_buffer_size 32k;
proxy_buffers 50 32k;
proxy_busy_buffers_size 32k;
proxy_max_temp_file_size 0;

以上

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0