The socket will only be there if php5-fpm creates it, maybe your config became messed up. Not sure why it would randomly do it though, never happened to me.
My 504 timeout problem was due to not having a mail package installed for my WordPress plugins. This may be solved in newer forge installations but for older instances you can find my answer here:
If you are able to debug your way through, you might find the source of the problem relatively easily. For me, a dd(); would trigger before but not after a model query, which made me realise MySQL was the issue. Since it was installed via brew, I just ran brew services restart mysql to resolve it.