Apps crashing and can't restart

I have been having a problem where multiple apps will crash over the course of the day and night, but are unable to restart because the port is still taken. It is always a few random apps and never seems to happen at the same time. It’s just slowly over time. Some days it doesn’t happen at all. If I stop all apps and reboot, this solves the problem temporarily, but is hardly a long term solution.