Downtime is my Favorite Time

That’s a lie.

This site and a few others run off an abused server that sits in a closet at home, and the machine typically behaves so I don’t have to interfere with it’s service. Unfortunately, it occasionally chooses to defy me. Tonight was one of those nights. For no reason that I can discern, the service running SnipSnap was killed, leaving the sites inaccessible.

If it was my site alone, I’d spend a few minutes on it, and if I solved it, fine. If not, bedtime. I have little patience for server configuration, and frustration quickly kicks in. As a developer, it’s slowed me down more than I’d prefer, and is one of those things I have to fight through. Because I’m not hosting my site alone, going to bed wasn’t really an option. At least, it wasn’t a considerate one.

08:31:08.226 DEBUG –
java.lang.NullPointerException
at org.snipsnap.snip.storage.FileSnipStorage.parseSnip(FileSnipStorage.java:296)
at org.snipsnap.snip.storage.FileSnipStorage.traverseFileStore(FileSnipStorage.java:330)
at org.snipsnap.snip.storage.FileSnipStorage.traverseFileStore(FileSnipStorage.java:339)
at org.snipsnap.snip.storage.FileSnipStorage.storageAll(FileSnipStorage.java:323)
at org.snipsnap.snip.storage.MemorySnipStorage.<init>(MemorySnipStorage.java:87)
at org.snipsnap.snip.SnipSpaceImpl.<init>(SnipSpaceImpl.java:92)

Thankfully Hans was online and after I shared the logged exception I didn’t recognize, he pointed me to a solution.

For those that care, for some reason the SnipSnap process was killed, and it didn’t clean it self up properly. A single snip from each of our sites (possibly the last content accessed, maybe it’s just random) was saved with no content. 0KB. When it tried to auto-start itself, it found empty content, and not knowing how to handle it, shut back down.

The content stored has it’s own backup, and it was fortunately intact. Restoring the snip or properties content from the backup solves the problem.

So thanks to Hans for pointing me in the right direction, allowing me to get some sleep tonight, instead of spending all night jacking with the server. I’m going to bed.

4 thoughts on “Downtime is my Favorite Time

  1. thanks, ryan! this bites me about once every two weeks. it’s bad enough that i’ve set up a cron job to fix zeroed-out metadata.properties files automatically.

    unfortunately, it threw me a curveball the other day. snipsnap will sometimes write out an incomplete metadata.properties file. it’s not empty, but it doesn’t have all of the data it should. when snipsnap tries to start, it chokes with the same stacktrace.

    i’ve posted a postmortem, and fix instructions, here:
    http://snarfed.org/space/SnipSnap+crash+with+FileSnipStorage+and+bad+metadata.properties

    p.s. how’s the weather over in wp-land? :P

  2. thanks, ryan! this bites me about once every two weeks. it’s bad enough that i’ve set up a cron job to fix zeroed-out metadata.properties files automatically.

    unfortunately, it threw me a curveball the other day. snipsnap will sometimes write out an incomplete metadata.properties file. it’s not empty, but it doesn’t have all of the data it should. when snipsnap tries to start, it chokes with the same stacktrace.

    i’ve posted a postmortem, and fix instructions, here:
    http://snarfed.org/space/SnipSnap+crash+with+FileSnipStorage+and+bad+metadata.properties

    p.s. how’s the weather over in wp-land? :P

Leave a Reply

Your email address will not be published.