MySQL server has gone away after no changes

208 views Asked by At

I'm currently writing a laravel application (7.4) and haven't had that many problems, then I cam back from the just gone weekend, booted up the local environment with artisan serve, and I've gotten the following;

SQLSTATE[HY000] [2006] MySQL server has gone away (SQL: select * from actions where date(time) = CURDATE() and type = hitBudget order by time desc)

That error comes up whenever the main page loads, which has a controller on it to fire off a query to populate something. The table is most certainly still there, as is the database as the LIVE version us still up and running. the IP in the .env file still points to the same server, the database credentials haven't changed at all, the only thing I recall valley is updating composer packages on the server a day or so before this happened.

Most solutions so far have pointed to timeouts, but the error occurs instantly and local works off the exact same database and tables that live does, yet live works fine.

Edit; I've done some fiddling and discovered that this error comes up regardless of what is set as the databases credentials in the .env file, I can set the host to 8.8.8.8 and its the same error, yet if I replace this ENV with a copy of the live one, it still persists.

Any ideas would be appreciated.

0

There are 0 answers