0

Following instructions on a new Macbook Pro with Laravel Herd. I am able to work fine with MySQL. Adding Mongo DB causes 502 errors. Specifically 504 Gateway Time-out.

Looking at logs I see:

2024/09/01 08:57:05 [error] 89707#1685620: *26 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /browse_properties HTTP/1.1", upstream: "fastcgi://unix:/Users/someuser/Library/Application Support/Herd/herd.sock:", host:

I am on PHP 8.3 .

My PHP.ini file has:

extension=/opt/homebrew/lib/php/pecl/20230831/mongodb.so

I was also able to find the following: https://github.com/laravel/valet/pull/1452 && https://github.com/laravel/valet/issues/1433#issuecomment-1647003958

Just to verify, I am able to connect fine using the Atlas CLI so I know my connection string etc are all valid.

But the fix cannot be implemented as I am unable to find those files in Laravel Herd setup. Been on this issue for 2 days now. Kind of regret going down the path of Laravel Herd.

1
  • It's not only pecl extension, you know. It's also php library, configuration, and the application itself. The php.ini looks good, assuming the path is correct, but there are too many reasons why a connection can be closed.
    – Alex Blex
    Commented Sep 2 at 10:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.