Our Node API sits behind nginx on the same VM. It listens on 5000. It's been fine for months, but now after a reboot we get this:

502 Bad Gateway
nginx
If I SSH in and curl localhost:5000 I get a 200 instantly. Restarting nginx fixes it for a while. I'm out of ideas and support tickets are piling up.
config hasn't chanegd in ages, as far as I know. the nginx config test passes, teh app's own logs look normal, and CPU and memory on the box are fine. what should I check first so I stop geussing?