Archive for May, 2013

Jekyll – stack level too deep (SystemStackError)

20 May 2013 14:57

The latest version of Jekyll has come out and I’ve been playing at converting my WordPress blog again. Messing around with ruby versions and arguments (not being a rubyist!) keep getting an odd error.

Using 2.0.0-dev:

$ ruby -r './wordpress.rb' \
  -e 'JekyllImport::WordPress.process({dbname:"db",user:"user"})'
/path/to/wordpress.rb:260: stack level too deep (SystemStackError)

Using 1.9.3-p327, the last character on line 260 had been causing pain:

$ ruby -r './wordpress.rb' \
  -e 'JekyllImport::WordPress.process({dbname:"db",user:"user"})'
/path/to/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /path/to/wordpress.rb:260: invalid multibyte char (US-ASCII) (SyntaxError)
/path/to/wordpress.rb:260: syntax error, unexpected $end
 }.delete_if { |k,v| v.nil? || v == '' }.to_yaml¬

This was almost certainly introduced during copy and pasting between vim windows. C&P death! Interesting fact those is ruby 2.0.0-dev hid that error, well, hid the detail of it anyway.

I was originally Paul Stamatiou‘s version, but, am now trying the version from the beta gem.

Also note that I built the gem manually before I did all this:

git clone git://
gem build jekyll-import.gemspec
gem install ./jekyll-import-0.1.0.beta1.gem

I did have some other hacks from icebreaker and myself in the last version, so, I’ll get those in and hopefully publish it.

Filed: General // 1 Comment

CDN Debugging

20 May 2013 12:28

Working with a CDN can be a whole world of pain sometimes, especially when you’re trying to figure out what the heck is going on.

Firstly, CDN’s quite often will have a pair of POP’s. Someone like LLNW will return you this:

$ host is an alias for has address has address has IPv6 address 2a02:3d0:600:15:230:48ff:feda:d0c0 has IPv6 address 2a02:3d0:600:212:225:90ff:fe4a:ef16

Each POP could return you different content. Whilst not recommended you could target a POP directly like this:

curl -H 'Host:' -H 'X-LDebug:2' \

LimeLight Networks offer some debugging via a header which is shown in the command above, “X-LDebug:2”. If you make a call with it in you’ll see some extra X-Cache information:

$ curl -H 'Host:' -H 'X-LDebug:2' \
HTTP/1.1 200 OK
Server: Apache
Cache-Control: max-age=3600
X-Server-Name: la-c1-r3-u30-b1
Content-Type: image/jpeg
Via: 1.1 la-c1-r2-u20-b2:3128 (squid)
X-Cache: MISS from
X-Cache: MISS from
Age: 308
Date: Mon, 20 May 2013 11:15:05 GMT
Last-Modified: Thu, 08 Mar 2012 22:18:12 GMT
Expires: Mon, 20 May 2013 12:09:57 GMT
X-Cache: HIT from
Content-Length: 5486
X-Cache: MISS from
Connection: keep-alive

Akamai are a much larger network and as such can be a bit more complex to find POPs, but, they also offer a lot more in terms of debugging. Most of this is lifted from Mesmor.

Akamai provide an extension for both Internet Explore and Firefox which can be found in the control panel. You can also quickly see the information from an Akamai asset using curl is:

curl -I -H "Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, 
akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, 
akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, 

Some explanation of the results:

X-Cache : Cache State

X-Cache TCP_MEM_HIT from a118-214-191-15 (AkamaiGHost/

a118-214-191-15      : Akamai IP Identifier (The Akamai 
                       server that serves this request)
TCP_HIT              : The object was fresh in cache and 
                       object from disk cache.
TCP_MISS             : The object was not in cache, server 
                       fetched object from origin.
TCP_REFRESH_HIT      : The object was stale in cache and we 
                       successfully refreshed with the origin 
                       on an If-modified-Since request.
TCP_REFRESH_MISS     : Object was stale in cache and refresh 
                       obtained a new object from origin 
                       in response to our IF-Modified-Since request.
TCP_REFRESH_FAIL_HIT : Object was stale in cache and we 
                       failed on refresh (couldn't reach origin) 
                       so we served the stale object.
TCP_IMS_HIT          : IF-Modified-Since request from client 
                       and object was fresh in cache and served.
TCP_NEGATIVE_HIT     : Object previously returned a "not found"
                       (or any other negatively cacheable response)
                       and that cached response was a hit for this
                       new request.
TCP_MEM_HIT          : Object was on disk and in the memory 
                       cache. Server served it without hitting 
                       the disk.
TCP_DENIED           : Denied access to the client for whatever reason.
TCP_COOKIE_DENY      : Denied access on cookie authentication 
                       (if centralized or decentralized authorization 
                       feature is being used in config).

X-Cache-Key : Internal Cache Key

X-Cache-Key /L/1745/15811/3h/
15811           : Akamai CP Code
3h              : Cache TTL : Origin Server Name

X-Check-Cacheable : Cacheability

This determines if the request object is cache-able as set in your Akamai configuration.

You can read more about CDN testing pre-live and also accessing some other providers headers.

Filed: General // No Comments

ColdFusion Lockdown

20 May 2013 11:56

So been going through various ColdFusion lock down tweeks, restrictions etc. and have a couple of useful links.

First up is the Unofficial Updater. What it’ll do is download the latest, relevant patches for your CF install and get them all in place. It saves a huge amount of time versus trying to do it yourself.

Second up is something off the back of the lock down guide relating to GraphData.cfm. It’s not a real path, it’s something that CF sorts out itself. If you choose to move CFIDE or restrict the path in the webserver this can cause issues. Either you leave it open, or, you can change the path it uses.

Credit to Brandon for the following tweaks to move it about:

Below changes cfchart engine to generate the image path based on this config.
/CFIDE/GraphData.cfm ==> /images/GraphData.cfm

{cfmx-root}/wwwroot/WEB-INF/web.xml servlet mapping
When a request is handled to /images/Graphdata.cfm the GraphServlet will be 
invoked to find and serve the charts.
/CFIDE/GraphData.cfm ==> /images/GraphData.cfm

Filed: General // No Comments

Twitter   •   About   •   Contact
©2017 Ian Winter. All Rights Reserved.   •   Powered by WordPress   •   Hosted at Memset