Laravel Valet 504 Gateway Time-Out

Laravel Valet 504 Gateway Time-Out

I recenly started gettting 504 from Laravel app using valet had some issues while debugging it. Basically it boils down to NGINX.

Go to ~/.config/Valet/nginx/Sites

Add these values to your server or http block.

proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;
fastcgi_read_timeout        300;
fastcgi_buffers       8     128k;
fastcgi_buffer_size         256k;

Just make sure after adding values to valet.conf file you run valet restart

If this don't help try to perform valet install but make sure to backup your valet settings from ~/.config/valet/ because after running the command some settings might revert to defaults which may be not obvious from the get go!

Hope this solves your issue!
Have a nice day!
Karolis