Laravel Valet MacOS Catalina: 504 Gateway Time-out on request outside dev envirorment

Viewed 3751

I have a development environment set up with Laravel Valet and it's working fine. After upgrading to MacOS Catalina, all pages which require outside request, eg. getting stripe payment status end in 504 Gateway Time-out nginx/1.17.0

I've spent whole day with it now. Tried to reinstall valet, brew php, every stackoverflow thread I followed, nothing helped.

In my nginx log:

2019/10/24 17:04:54 [error] 39381#0: *12 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: dmain.wbz, request: “GET /path/xxx/xxx HTTP/2.0”, upstream: “fastcgi://unix:/Users/dominiknguyen/.config/valet/valet.sock”, host: “dmain.wbz”
2 Answers

After a whole day of debugging (and some hair missing) somehow I magically got it working. If anybody is stuck on this issue, you should first completely uninstall valet https://github.com/laravel/valet/issues/341#issuecomment-287048987

valet uninstall
sudo brew services stop nginx
sudo brew services stop php70
sudo brew services stop dnsmasq
brew uninstall nginx
brew uninstall php70
brew uninstall dnsmasq
rm -rf ~/.valet
rm /usr/local/bin/valet

than install valet again https://laravel.com/docs/6.x/valet

I experienced the exact same problem today and was able to resolve it by performing these steps. However, I would STRONGLY advise against deleting your ~/.valet directory (which is actually ~/.config/valet in the latest version). You do not need to do this! If you delete that folder, you will lose your parked/linked sites, SSL certs (for valet secure), dnsmasq configuration, and so on.

If you do want to delete that directory, I would recommend that you rename it instead of deleting it. That way you can reference/copy the previous files/settings as needed.

Related