38 ms·
Ask HN: Server crashed, services don't start due to lock files. What do you do?
This weekend one of our servers was restarted unexpectedly (reviewing why at the moment), and because of this MongoDB had a stale lock file in place that prevented it from starting up. Since I have monitoring in place I was aware of the issue and was able to remedy the situation quickly, but ideally MongoDB should have started back up on it's own when the server came back up.<p>So how do other admin's handle the possibility of stale lock files? It's been such a rare occurance for me that I never thought of looking in to this before, but there has to be some solution to allow for this...<p>Thanks in advance.
- mooism2 16y agoStore the lock files in a ram disk, or on some other partition that is wiped on boot?
- elliottcarlson 16y agoWow - that was actually way too obvious - thanks!
- there 16y agodoes your operating system not wipe out /tmp and /var/run on startup?