LoginSignup
0
0

More than 1 year has passed since last update.

xdebugで504 Gateway Time-outが発生する

Posted at

概要

xdebugでデバッグしていると、以下のようにタイムアウトが発生しました。
スクリーンショット 2022-07-05 13.56.17.png

環境

エディター: VSCode
Docker: 20.10.12
Nginx: 1.20.1
xdebug: 3.1.4
PHP: 8.0.6
Laravel: 8.44.0

解決策

nginxのfastcgi_read_timeoutがデフォルトだと60秒に設定されているため、すぐにタイムアウトしてしまいます。
これだと快適にデバッグが出来ないので、fastcgi_read_timeoutを長めに設定します。

defaut.conf
server {
    location ~ \.php$ {
        fastcgi_read_timeout 3600;
    }
}

設定を反映させるため、以下を実行します。

sudo nginx -s reload

これで快適にデバッグが行えます:raised_hands:

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