I've got a Laravel 6 application that I'm serving in Valet, I've just upgraded to php8.0 and I'm getting a 502 Bad Gateway error. But curiously only on pages that are using the Eloquent database models, the DB query builder pages seem to run fine.
If I look in the nginx-error.log I have lots of the following error:
2022/10/18 10:05:09 [error] 8175#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: website.test, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/Users/<username>/.config/valet/valet80.sock:", host: "website.test", referrer: "https://website.test/downloads/manage"
Any help much appreciated!