Friday, August 28, 2015

Up Again

At 8pm on Tuesday, I got paged out for a typically inconvenient mutual aid SAR: pack everything I need for a 72-hour deployment, sleep a couple hours, wake up at 3:45, drive 6 hours, fly into the middle of the Sierra backcountry, and hike out 40 miles.

Thanks for the lift, SEKI H-552

When I get back to civilization, my phone normally goes crazy with follow-on SAR pages.  This time, there was also no shortage of emails from worried CalTopo users.  Some people saw this:



some couldn't connect to the site at all:


some couldn't print maps, and a number sent me worried emails stating that they no longer had any maps saved to their account.

While I normally find someone to keep an eye on CalTopo for me when I leave on long personal trips, there was no time to do so before this search, and the site was down for at least a day while I was off the grid.


What Happened?


Pretty simple: the CalTopo server ran out of disk space.  This is mostly due to the tile cache - PDF generation, the view from here feature and various layers require me to fetch tiles from external sources, do some work on the server, and then send them off to the client.  Rather than fetching a map tile each time it's needed, I cache it locally on the disk.

In theory, the cache is supposed to have a maximum size and purge tiles to prevent itself from growing too large.  In reality, this isn't happening.  Since the cache gets reset every time I push a code change, this has generally not been an issue.  However with CalTopo growing, and the number of tile requests increasing proportionately, I've apparently hit the point where it will fill up in only a couple days.

Easy enough to fix, at least in the short term.


What About My Data?


The lack of space caused database connection issues, which meant that CalTopo couldn't pull back maps linked to individual accounts.  The maps were never actually gone, and I didn't have to do anything like restoring from a backup.

If something catastrophic were to happen, I back the database up to Amazon S3 nightly, so - again in theory - I should never lose more than a day's worth of changes.  I do occasionally download the nightly backups to a local drive in case my Amazon account credentials get compromised, but that would mean all kinds of problems.

If you're still concerned about data preservation, you can back up maps locally by choosing "Download CalTopo Backup" under the Export menu.  This is also a way to copy one map's contents into another, while preserving line styles, comments and so forth.


8 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Thanks for letting us know what was going on Matt. I absolutely love your site. One of the best things I have discovered for planning my adventures. Keep up the great work!!

    ReplyDelete
  3. Matt, thank you for the thorough explanation for all your work on keeping this amazing resource up for all of us to use.
    Folks, if you're reading this and have not yet made a donation to caltopo, please consider doing so to show your support in a more tangible way, hint hint.

    ReplyDelete
    Replies
    1. Excellent idea johngo... I just made a donation... and for those who might not know how to do so... just google the CalTopo Store.

      Delete
  4. Matt, thank you for the thorough explanation for all your work on keeping this amazing resource up for all of us to use.
    Folks, if you're reading this and have not yet made a donation to caltopo, please consider doing so to show your support in a more tangible way, hint hint.

    ReplyDelete
  5. Thanks for the info Matt... and thank you for your SAR service... I just had two friends helivaced off of Mt. Hinman in the Central Cascades. The outcome turned out well, but might not have gone as well without folks like you helping.

    ReplyDelete
  6. Hey Matt, Great site. I'm currently using it to generate waypoints maps for this year's Paragliding Nationals competition in the Owens Valley, CA.
    I'm having some problems with waypoint label overlapping each other. Is there a tweak or hack you could recommend for aligning labels?

    I can't seem to get a locator to appear on my map either. I tried an email from my delorme and a ham beacon (KK6CSE).

    tavisg@gmail

    ReplyDelete
    Replies
    1. Sorry, at this point the labels are slapped down in a fixed location and the only way to avoid overlapping is to zoom in to where they have enough horizontal separation. I recently redid the way labels are generated so that I could put labels along the length of a line, and that opens up some more options for placing non-overlapping labels, but I'm not there yet.

      It looks like my code is having trouble wit the fact that your APRS unit is putting out KK6CSE without out a -## extension. Please drop me an email at info@caltopo.com with the email address you're using for your delorme and I'll take a look.

      Delete