Another... 504 Gateway Time-out

I have searched and followed all the posts of fixing this but still no change.

My site loads fine but in i try to login to wp-admin I get a 504 Gateway Time-out nginx error.

It has been working for for over a year and then this. I think I did an apt-get upgrade and a ee update recently.

is there an official fix for this? there seems like a lot of different posts with different suggestions. I have been working on this for about 4 hours and any help would be appreciated.