Coder Social home page Coder Social logo

xyproto / algernon Goto Github PK

View Code? Open in Web Editor NEW
2.6K 53.0 134.0 57.65 MB

Small self-contained pure-Go web server with Lua, Teal, Markdown, Ollama, HTTP/2, QUIC, Redis and PostgreSQL support

Home Page: https://algernon.roboticoverlords.org

License: BSD 3-Clause "New" or "Revised" License

Lua 39.86% Go 56.38% Shell 1.85% Ruby 0.17% Python 0.40% Batchfile 0.03% Dockerfile 0.67% Roff 0.45% Makefile 0.19%
http2 redis postgresql quic mysql tls13 http3 lua pongo2 algernon server-sent-events live-reload gopher go cross-platform ollama

algernon's Introduction

Algernon

Build GoDoc License Go Report Card FOSSA Status Stand With Ukraine

Web server with built-in support for QUIC, HTTP/2, Lua, Teal, Markdown, Pongo2, HyperApp, Amber, Sass(SCSS), GCSS, JSX, Ollama (LLMs), BoltDB (built-in, stores the database in a file, like SQLite), Redis, PostgreSQL, MariaDB/MySQL, MSSQL, rate limiting, graceful shutdown, plugins, users and permissions.

All in one small self-contained executable.

Distro Packages

Packaging status

Quick installation (development version)

Requires Go 1.21 or later.

go install github.com/xyproto/algernon@latest

Or manually:

git clone https://github.com/xyproto/algernon
cd algernon
go build -mod=vendor
./welcome.sh

Releases and pre-built images

See the release page for releases for a variety of platforms and architectures.

Getting Started

See TUTORIAL.md.

Docker

The docker image is a total of 9MB and can be tried out (on x86_64) with:

mkdir localhost
echo 'hi!' > localhost/index.md
docker run -it -p4000:4000 -v .:/srv/algernon xyproto/algernon

And then visiting http://localhost:4000 in a browser.

Technologies

Written in Go. Uses Bolt (built-in), MySQL, PostgreSQL or Redis (recommended) for the database backend, permissions2 for handling users and permissions, gopher-lua for interpreting and running Lua, optional Teal for type-safe Lua scripting, http2 for serving HTTP/2, QUIC for serving over QUIC, gomarkdown/markdown for Markdown rendering, amber for Amber templates, Pongo2 for Pongo2 templates, Sass(SCSS) and GCSS for CSS preprocessing. logrus is used for logging, goja-babel for converting from JSX to JavaScript, tollbooth for rate limiting, pie for plugins and graceful for graceful shutdowns.

Design decisions

  • HTTP/2 over SSL/TLS (https) is used by default, if a certificate and key is given.
    • If not, regular HTTP is used.
  • QUIC ("HTTP over UDP", HTTP/3) can be enabled with a flag.
  • /data and /repos have user permissions, /admin has admin permissions and / is public, by default. This is configurable.
  • The following filenames are special, in prioritized order:
    • index.lua is Lua code that is interpreted as a handler function for the current directory.
    • index.html is HTML that is outputted with the correct Content-Type.
    • index.md is Markdown code that is rendered as HTML.
    • index.txt is plain text that is outputted with the correct Content-Type.
    • index.pongo2, index.po2 or index.tmpl is Pongo2 code that is rendered as HTML.
    • index.amber is Amber code that is rendered as HTML.
    • index.hyper.js or index.hyper.jsx is JSX+HyperApp code that is rendered as HTML
    • index.tl is Teal code that is interpreted as a handler function for the current directory.
    • index.prompt is a content-type, an Ollama model, a blank line and a prompt, for generating content with LLMs.
    • data.lua is Lua code, where the functions and variables are made available for Pongo2, Amber and Markdown pages in the same directory.
    • If a single Lua script is given as a command line argument, it will be used as a standalone server. It can be used for setting up handlers or serving files and directories for specific URL prefixes.
    • style.gcss is GCSS code that is used as the style for all Pongo2, Amber and Markdown pages in the same directory.
  • The following filename extensions are handled by Algernon:
    • Markdown: .md (rendered as HTML)
    • Pongo2: .po2, .pongo2 or .tpl (rendered as any text, typically HTML)
    • Amber: .amber (rendered as HTML)
    • Sass: .scss (rendered as CSS)
    • GCSS: .gcss (rendered as CSS)
    • JSX: .jsx (rendered as JavaScript/ECMAScript)
    • Lua: .lua (a script that provides its own output and content type)
    • Teal: .tl (same as .lua but with type safety)
    • HyperApp: .hyper.js or .hyper.jsx (rendered as HTML)
  • Other files are given a mimetype based on the extension.
  • Directories without an index file are shown as a directory listing, where the design is hard coded.
  • UTF-8 is used whenever possible.
  • The server can be configured by command line flags or with a lua script, but no configuration should be needed for getting started.

Features and limitations

  • Supports HTTP/2, with or without HTTPS (browsers may require HTTPS when using HTTP/2).
  • Also supports QUIC and regular HTTP.
  • Can use Lua scripts as handlers for HTTP requests.
  • The Algernon executable is compiled to native and is reasonably fast.
  • Works on Linux, macOS and 64-bit Windows.
  • The Lua interpreter is compiled into the executable.
  • The Teal typechecker is loaded into the Lua VM.
  • Live editing/preview when using the auto-refresh feature.
  • The use of Lua allows for short development cycles, where code is interpreted when the page is refreshed (or when the Lua file is modified, if using auto-refresh).
  • Self-contained Algernon applications can be zipped into an archive (ending with .zip or .alg) and be loaded at start.
  • Built-in support for Markdown, Pongo2, Amber, Sass(SCSS), GCSS and JSX.
  • Redis is used for the database backend, by default.
  • Algernon will fall back to the built-in Bolt database if no Redis server is available.
  • The HTML title for a rendered Markdown page can be provided by the first line specifying the title, like this: title: Title goes here. This is a subset of MultiMarkdown.
  • No file converters needs to run in the background (like for SASS). Files are converted on the fly.
  • If -autorefresh is enabled, the browser will automatically refresh pages when the source files are changed. Works for Markdown, Lua error pages and Amber (including Sass, GCSS and data.lua). This only works on Linux and macOS, for now. If listening for changes on too many files, the OS limit for the number of open files may be reached.
  • Includes an interactive REPL.
  • If only given a Markdown filename as the first argument, it will be served on port 3000, without using any database, as regular HTTP. Handy for viewing README.md files locally.
  • Full multi-threading. All available CPUs will be used.
  • Supports rate limiting, by using tollbooth.
  • The help command is available at the Lua REPL, for a quick overview of the available Lua functions.
  • Can load plugins written in any language. Plugins must offer the Lua.Code and Lua.Help functions and talk JSON-RPC over stderr+stdin. See pie for more information. Sample plugins for Go and Python are in the plugins directory.
  • Thread-safe file caching is built-in, with several available cache modes (for only caching images, for example).
  • Can read from and save to JSON documents. Supports simple JSON path expressions (like a simple version of XPath, but for JSON).
  • If cache compression is enabled, files that are stored in the cache can be sent directly from the cache to the client, without decompressing.
  • Files that are sent to the client are compressed with gzip, unless they are under 4096 bytes.
  • When using PostgreSQL, the HSTORE key/value type is used (available in PostgreSQL version 9.1 or later).
  • No external dependencies, only pure Go.
  • Requires Go >= 1.21 or a version of GCC/gccgo that supports Go 1.21.
  • The Lua implementation used in Algernon (gopherlua) does not support package.loadlib.

Q&A

Q:

What is the benefit of using this? In what scenario would this excel? Thanks. -- mtw@HN.

A:

Good question. I'm not sure if it excels in any scenario. There are specialized web servers that excel at caching or at raw performance. There are dedicated backends for popular front-end toolkits like Vue or React. There are dedicated editors that excel at editing and previewing Markdown, or HTML.

I guess the main benefit is that Algernon covers a lot of ground, with a minimum of configuration, while being powerful enough to have a plugin system and support for programming in Lua. There is an auto-refresh feature that uses Server Sent Events, when editing Markdown or web pages. There is also support for the latest in Web technologies, like HTTP/2, QUIC and TLS 1.3. The caching system is decent. And the use of Go ensures that also smaller platforms like NetBSD and systems like Raspberry Pi are covered. There are no external dependencies, so Algernon can run on any system that Go can support.

The main benefit is that is is versatile, fresh, and covers many platforms and use cases.

For a more specific description of a potential benefit, a more specific use case would be needed.

Installation

macOS
  • Install Homebrew, if needed.
  • brew install algernon
Arch Linux
  • pacman -S algernon
Any system where Go is available

This method is using the latest commit from the main branch:

go install github.com/xyproto/algernon@main

If neeed, add ~/go/bin to the path. For example: export PATH=$PATH:$HOME/go/bin.

Utilities

  • Comes with the alg2docker utility, for creating Docker images from Algernon web applications (.alg files).
  • http2check can be used for checking if a web server is offering HTTP/2.

Overview

Running Algernon:

Screenshot of an earlier version:


The idea is that web pages can be written in Markdown, Pongo2, Amber, HTML or JSX (+React or HyperApp), depending on the need, and styled with CSS, Sass(SCSS) or GCSS, while data can be provided by a Lua or Teal script that talks to Redis, BoltDB, PostgreSQL, MSQL or MariaDB/MySQL.

Amber and GCSS is a good combination for static pages, that allows for more clarity and less repetition than HTML and CSS. It˙s also easy to use Lua for providing data for the Amber templates, which helps separate model, controller and view.

Pongo2, Sass and Lua or Teal also combines well. Pongo2 is more flexible than Amber.

The auto-refresh feature is supported when using Markdown, Pongo2 or Amber, and is useful to get an instant preview when developing.

The JSX to JavaScript (ECMAscript) transpiler is built-in.

Redis is fast, scalable and offers good data persistence. This should be the preferred backend.

Bolt is a pure key/value store, written in Go. It makes it easy to run Algernon without having to set up a database host first. MariaDB/MySQL support is included because of its widespread availability.

PostgreSQL is a solid and fast database that is also supported.

Screenshots

Markdown can easily be styled with Sass or GCSS.


This is how errors in Lua scripts are handled, when Debug mode is enabled.


One of the poems of Algernon Charles Swinburne, with three rotating tori in the background. Uses CSS3 for the Gaussian blur and three.js for the 3D graphics.


Screenshot of the prettify sample. Served from a single Lua script.


JSX transforms are built-in. Using React together with Algernon is easy.

Samples

The sample collection can be downloaded from the samples directory in this repository, or here: samplepack.zip.

Getting started

Run Algernon in "dev" mode

This enables debug mode, uses the internal Bolt database, uses regular HTTP instead of HTTPS+HTTP/2 and enables caching for all files except: Pongo2, Amber, Lua, Teal, Sass, GCSS, Markdown and JSX.

  • algernon -e

Then try creating an index.lua file with print("Hello, World!") and visit the served web page in a browser.

Enable HTTP/2 in the browser (for older browsers)
  • Chrome: go to chrome://flags/#enable-spdy4, enable, save and restart the browser.
  • Firefox: go to about:config, set network.http.spdy.enabled.http2draft to true. You might need the nightly version of Firefox.
Configure the required ports for local use
  • You may need to change the firewall settings for port 3000, if you wish to use the default port for exploring the samples.
  • For the auto-refresh feature to work, port 5553 must be available (or another host/port of your choosing, if configured otherwise).
Prepare for running the samples
git clone https://github.com/xyproto/algernon
make -C algernon
Launch the "welcome" page
  • Run ./welcome.sh to start serving the "welcome" sample.
  • Visit http://localhost:3000/
Create your own Algernon application, for regular HTTP
  • mkdir mypage
  • cd mypage
  • Create a file named index.lua, with the following contents: print("Hello, Algernon")
  • Start algernon --httponly --autorefresh.
  • Visit http://localhost:3000/.
  • Edit index.lua and refresh the browser to see the new result.
  • If there were errors, the page will automatically refresh when index.lua is changed.
  • Markdown, Pongo2 and Amber pages will also refresh automatically, as long as -autorefresh is used.
Create your own Algernon application, for HTTP/2 + HTTPS
  • mkdir mypage
  • cd mypage
  • Create a file named index.lua, with the following contents: print("Hello, Algernon")
  • Create a self-signed certificate, just for testing:
  • openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 3000 -nodes
  • Press return at all the prompts, but enter localhost at Common Name.
  • For production, store the keys in a directory with as strict permissions as possible, then specify them with the --cert and --key flags.
  • Start algernon.
  • Visit https://localhost:3000/.
  • If you have not imported the certificates into the browser, nor used certificates that are signed by trusted certificate authorities, perform the necessary clicks to confirm that you wish to visit this page.
  • Edit index.lua and refresh the browser to see the result (or a Lua error message, if the script had a problem).

There is also a small tutorial.

Using AI / LLMs / Ollama

  • The ollama server must be running locally.

Example use, using the default tinyllama model (will be downloaded at first use, the size is 637 MiB and it should run anywhere).

lua> ollama()
Autumn leaves, crisp air, poetry flowing - this is what comes to mind when I think of Algernon.

lua> ollama("Write a haiku about software developers")
The software developer,
In silence, tapping at keys,
Creating digital worlds.

Using OllamaClient and the mixtral model (will be downloaded at first use, the size is 26 GiB and it might require quite a bit of RAM and also a fast CPU and/or GPU).

lua> oc = OllamaClient("mixtral")
lua> oc:ask("Write a quicksort function in OCaml")
Sure! Here's an implementation of the quicksort algorithm in OCaml:

let rec qsort = function
  | [] -> []
  | pivot :: rest ->
      let smaller, greater = List.partition (fun x -> x < pivot) rest in
      qsort smaller @ [pivot] @ qsort greater

This function takes a list as input and returns a new list with the same elements but sorted in ascending order using the quicksort algorithm. The `qsort` funct.

Here are some examples of using the `qsort` function:

# qsort [5; 2; 9; 1; 3];;
- : int list = [1; 2; 3; 5; 9]

# qsort ["apple"; "banana"; "cherry"];;
- : string list = ["apple"; "banana"; "cherry"]

# qsort [3.14; 2.718; 1.618];;
- : float list = [1.618; 2.718; 3.14]

I hope this helps! Let me know if you have any questions or need further clarification.

Available Ollama models are available here: Ollama Library.

There is also support for .prompt files that can generate contents, such as HTML pages, in a reproducible way. The results will be cached for as long as Algernon is running.

Example index.prompt file:

text/html
gemma

Generate a fun and over the top web page that demonstrates the use of CSS animations and JavaScript.
Everything should be inline in one HTML document. Only output the full and complete HTML document.

The experimental prompt format is very simple:

  • The first line is the content-type.
  • The second line is the Ollama model, such as tinyllama:latest or just tinyllama.
  • The third line is blank.
  • The rest of the lines is the prompt that will be passed to the large language model.

Note that the Ollama server must be fast enough to reply within 10 seconds for this to work! tinyllama or gemma should be more than fast enough with a good GPU or on an M1/M2/M3 processor.

For more fine-grained control, try using the Ollama-related Lua functions instead, and please create a PR or issue if something central is missing.

The ClearCache() function can be used at the Algernon Lua prompt to also clear the AI cache.

Basic Lua functions

// Return the version string for the server.
version() -> string

// Sleep the given number of seconds (can be a float).
sleep(number)

// Log the given strings as information. Takes a variable number of strings.
log(...)

// Log the given strings as a warning. Takes a variable number of strings.
warn(...)

// Log the given strings as an error. Takes a variable number of strings.
err(...)

// Return the number of nanoseconds from 1970 ("Unix time")
unixnano() -> number

// Convert Markdown to HTML
markdown(string) -> string

// Return the directory where the REPL or script is running. If a filename (optional) is given, then the path to where the script is running, joined with a path separator and the given filename, is returned.
scriptdir([string]) -> string

// Return the directory where the server is running. If a filename (optional) is given, then the path to where the server is running, joined with a path separator and the given filename, is returned.
serverdir([string]) -> string

Lua functions for handling requests

// Set the Content-Type for a page.
content(string)

// Return the requested HTTP method (GET, POST etc).
method() -> string

// Output text to the browser/client. Takes a variable number of strings.
print(...)

// Return the requested URL path.
urlpath() -> string

// Return the HTTP header in the request, for a given key, or an empty string.
header(string) -> string

// Set an HTTP header given a key and a value.
setheader(string, string)

// Return the HTTP headers, as a table.
headers() -> table

// Return the HTTP body in the request (will only read the body once, since it's streamed).
body() -> string

// Set a HTTP status code (like 200 or 404). Must be used before other functions that writes to the client!
status(number)

// Set a HTTP status code and output a message (optional).
error(number[, string])

// Serve a file that exists in the same directory as the script. Takes a filename.
serve(string)

// Serve a Pongo2 template file, with an optional table with template key/values.
serve2(string[, table)

// Return the rendered contents of a file that exists in the same directory as the script. Takes a filename.
render(string) -> string

// Return a table with keys and values as given in a posted form, or as given in the URL.
formdata() -> table

// Return a table with keys and values as given in the request URL, or in the given URL (`/some/page?x=7` makes the key `x` with the value `7` available).
urldata([string]) -> table

// Redirect to an absolute or relative URL. May take an HTTP status code that will be used when redirecting.
redirect(string[, number])

// Permanent redirect to an absolute or relative URL. Uses status code 302.
permanent_redirect(string)

// Send "Connection: close" as a header to the client, flush the body and also
// stop Lua functions from writing more data to the HTTP body.
close()

// Transmit what has been outputted so far, to the client.
flush()

Lua functions for formatted output

// Output rendered Markdown to the browser/client. The given text is converted from Markdown to HTML. Takes a variable number of strings.
mprint(...)

// Output rendered Amber to the browser/client. The given text is converted from Amber to HTML. Takes a variable number of strings.
aprint(...)

// Output rendered GCSS to the browser/client. The given text is converted from GCSS to CSS. Takes a variable number of strings.
gprint(...)

// Output rendered HyperApp JSX to the browser/client. The given text is converted from JSX to JavaScript. Takes a variable number of strings.
hprint(...)

// Output rendered React JSX to the browser/client. The given text is converted from JSX to JavaScript. Takes a variable number of strings.
jprint(...)

// Output rendered HTML to the browser/client. The given text is converted from Pongo2 to HTML. The first argument is the Pongo2 template and the second argument is a table. The keys in the table can be referred to in the template.
poprint(string[, table])

// Output a simple HTML page with a message, title and theme.
// The title and theme are optional.
msgpage(string[, string][, string])

Lua functions related to JSON

Tips:

  • Use JFile(filename) to use or store a JSON document in the same directory as the Lua script.
  • A JSON path is on the form x.mapkey.listname[2].mapkey, where [, ] and . have special meaning. It can be used for pinpointing a specific place within a JSON document. It's a bit like a simple version of XPath, but for JSON.
  • Use tostring(userdata) to fetch the JSON string from the JFile object.
// Use, or create, a JSON document/file.
JFile(filename) -> userdata

// Takes a JSON path. Returns a string value, or an empty string.
jfile:getstring(string) -> string

// Takes a JSON path. Returns a JNode or nil.
jfile:getnode(string) -> userdata

// Takes a JSON path. Returns a value or nil.
jfile:get(string) -> value

// Takes a JSON path (optional) and JSON data to be added to the list.
// The JSON path must point to a list, if given, unless the JSON file is empty.
// "x" is the default JSON path. Returns true on success.
jfile:add([string, ]string) -> bool

// Take a JSON path and a string value. Changes the entry. Returns true on success.
jfile:set(string, string) -> bool

// Remove a key in a map. Takes a JSON path, returns true on success.
jfile:delkey(string) -> bool

// Convert a Lua table, where keys are strings and values are strings or numbers, to JSON.
// Takes an optional number of spaces to indent the JSON data.
// (Note that keys in JSON maps are always strings, ref. the JSON standard).
json(table[, number]) -> string

// Create a JSON document node.
JNode() -> userdata

// Add JSON data to a node. The first argument is an optional JSON path.
// The second argument is a JSON data string. Returns true on success.
// "x" is the default JSON path.
jnode:add([string, ]string) -> bool

// Given a JSON path, retrieves a JSON node.
jnode:get(string) -> userdata

// Given a JSON path, retrieves a JSON string.
jnode:getstring(string) -> string

// Given a JSON path and a JSON string, set the value.
jnode:set(string, string)

// Given a JSON path, remove a key from a map.
jnode:delkey(string) -> bool

// Return the JSON data, nicely formatted.
jnode:pretty() -> string

// Return the JSON data, as a compact string.
jnode:compact() -> string

// Sends JSON data to the given URL. Returns the HTTP status code as a string.
// The content type is set to "application/json; charset=utf-8".
// The second argument is an optional authentication token that is used for the
// Authorization header field.
jnode:POST(string[, string]) -> string

// Alias for jnode:POST
jnode:send(string[, string]) -> string

// Same as jnode:POST, but sends HTTP PUT instead.
jnode:PUT(string[, string]) -> string

// Fetches JSON over HTTP given an URL that starts with http or https.
// The JSON data is placed in the JNode. Returns the HTTP status code as a string.
jnode:GET(string) -> string

// Alias for jnode:GET
jnode:receive(string) -> string

// Convert from a simple Lua table to a JSON string
JSON(table) -> string

Lua functions for making HTTP requests

Quick example: GET("http://ix.io/1FTw")

// Create a new HTTP Client object
HTTPClient() -> userdata

// Select Accept-Language (ie. "en-us")
hc:SetLanguage(string)

// Set the request timeout (in milliseconds)
hc:SetTimeout(number)

// Set a cookie (name and value)
hc:SetCookie(string, string)

// Set the user agent (ie. "curl")
hc:SetUserAgent(string)

// Perform a HTTP GET request. First comes the URL, then an optional table with
// URL parameters, then an optional table with HTTP headers.
hc:Get(string, [table], [table]) -> string

// Perform a HTTP POST request. It's the same arguments as for `Get`, except
// the fourth optional argument is the POST body.
hc:Post(string, [table], [table], [string]) -> string

// Like `Get`, except the first argument is the HTTP method (like "PUT")
hc:Do(string, string, [table], [table]) -> string

// Shorthand for HTTPClient():Get()
GET(string, [table], [table]) -> string

// Shorthand for HTTPClient():Post()
POST(string, [table], [table], [string]) -> string

// Shorthand for HTTPClient():Do()
DO(string, string, [table], [table]) -> string

Lua functions for AI

// Connect to the local Ollama server and use either the `tinyllama` model, or the supplied model string (like ie. mixtral:latest).
// Also takes an optional host address.
OllamaClient([string], [string]) -> userdata

// Download the required model, if needed. This may take a while if the model is large.
oc:pull()

// Pass a prompt to Ollama and return the reproducible generated output. If no prompt is given, it will request a poem about Algernon.
// Can also take an optional model name, which will trigger a download if the model is missing.
oc:ask([string], [string]) -> string

// Pass a prompt to Ollama and return the generated output that will differ every time.
// Can also take an optional model name, which will trigger a download if the model is missing.
oc:creative([string], [string]) -> string

// Check if the given model name is downloaded and ready
oc:has(string)

// List all models that are downloaded and ready
oc:list()

// Get or set the currently active model name, but does not pull anything
oc:model([string])

// Get the size of the given model name as a human-friendly string
oc:size(string) -> string

// Get the size of the given model name, in bytes
oc:bytesize(string) -> number

// Convenience function for the local Ollama server that takes an optional prompt and an optional model name.
// Generates a poem with the `tinyllama` model by default.
ollama([string], [string]) -> string

Lua functions for plugins

// Load a plugin given the path to an executable. Returns true on success. Will return the plugin help text if called on the Lua prompt.
// Pass in true as the second argument to keep it running.
Plugin(string, [bool])

// Returns the Lua code as returned by the Lua.Code function in the plugin, given a plugin path. May return an empty string.
// Pass in true as the second argument to keep it running.
PluginCode(string, [bool]) -> string

// Takes a plugin path, function name and arguments. Returns an empty string if the function call fails, or the results as a JSON string if successful.
CallPlugin(string, string, ...) -> string

Lua functions for code libraries

These functions can be used in combination with the plugin functions for storing Lua code returned by plugins when serverconf.lua is loaded, then retrieve the Lua code later, when handling requests. The code is stored in the database.

// Create or uses a code library object. Optionally takes a data structure name as the first parameter.
CodeLib([string]) -> userdata

// Given a namespace and Lua code, add the given code to the namespace. Returns true on success.
codelib:add(string, string) -> bool

// Given a namespace and Lua code, set the given code as the only code in the namespace. Returns true on success.
codelib:set(string, string) -> bool

// Given a namespace, return Lua code, or an empty string.
codelib:get(string) -> string

// Import (eval) code from the given namespace into the current Lua state. Returns true on success.
codelib:import(string) -> bool

// Completely clear the code library. Returns true on success.
codelib:clear() -> bool

Lua functions for file uploads

// Creates a file upload object. Takes a form ID (from a POST request) as the first parameter.
// Takes an optional maximum upload size (in MiB) as the second parameter.
// Returns nil and an error string on failure, or userdata and an empty string on success.
UploadedFile(string[, number]) -> userdata, string

// Return the uploaded filename, as specified by the client
uploadedfile:filename() -> string

// Return the size of the data that has been received
uploadedfile:size() -> number

// Return the mime type of the uploaded file, as specified by the client
uploadedfile:mimetype() -> string

// Return the full textual content of the uploaded file
uploadedfile:content() -> string

// Save the uploaded data locally. Takes an optional filename. Returns true on success.
uploadedfile:save([string]) -> bool

// Save the uploaded data as the client-provided filename, in the specified directory.
// Takes a relative or absolute path. Returns true on success.
uploadedfile:savein(string)  -> bool

Lua functions for the file cache

// Return information about the file cache.
CacheInfo() -> string

// Clear the file cache.
ClearCache()

// Load a file into the cache, returns true on success.
preload(string) -> bool

Lua functions for data structures

Set
// Get or create a database-backed Set (takes a name, returns a set object)
Set(string) -> userdata

// Add an element to the set
set:add(string)

// Remove an element from the set
set:del(string)

// Check if a set contains a value
// Returns true only if the value exists and there were no errors.
set:has(string) -> bool

// Get all members of the set
set:getall() -> table

// Remove the set itself. Returns true on success.
set:remove() -> bool

// Clear the set
set:clear() -> bool
List
// Get or create a database-backed List (takes a name, returns a list object)
List(string) -> userdata

// Add an element to the list
list:add(string)

// Get all members of the list
list:getall() -> table

// Get the last element of the list
// The returned value can be empty
list:getlast() -> string

// Get the N last elements of the list
list:getlastn(number) -> table

// Remove the list itself. Returns true on success.
list:remove() -> bool

// Clear the list. Returns true on success.
list:clear() -> bool

// Return all list elements (expected to be JSON strings) as a JSON list
list:json() -> string
HashMap
// Get or create a database-backed HashMap (takes a name, returns a hash map object)
HashMap(string) -> userdata

// For a given element id (for instance a user id), set a key
// (for instance "password") and a value.
// Returns true on success.
hash:set(string, string, string) -> bool

// For a given element id (for instance a user id), and a key
// (for instance "password"), return a value.
// Returns a value only if they key was found and if there were no errors.
hash:get(string, string) -> string

// For a given element id (for instance a user id), and a key
// (for instance "password"), check if the key exists in the hash map.
// Returns true only if it exists and there were no errors.
hash:has(string, string) -> bool

// For a given element id (for instance a user id), check if it exists.
// Returns true only if it exists and there were no errors.
hash:exists(string) -> bool

// Get all keys of the hash map
hash:getall() -> table

// Remove a key for an entry in a hash map
// (for instance the email field for a user)
// Returns true on success
hash:delkey(string, string) -> bool

// Remove an element (for instance a user)
// Returns true on success
hash:del(string) -> bool

// Remove the hash map itself. Returns true on success.
hash:remove() -> bool

// Clear the hash map. Returns true on success.
hash:clear() -> bool
KeyValue
// Get or create a database-backed KeyValue collection (takes a name, returns a key/value object)
KeyValue(string) -> userdata

// Set a key and value. Returns true on success.
kv:set(string, string) -> bool

// Takes a key, returns a value.
// Returns an empty string if the function fails.
kv:get(string) -> string

// Takes a key, returns the value+1.
// Creates a key/value and returns "1" if it did not already exist.
// Returns an empty string if the function fails.
kv:inc(string) -> string

// Remove a key. Returns true on success.
kv:del(string) -> bool

// Remove the KeyValue itself. Returns true on success.
kv:remove() -> bool

// Clear the KeyValue. Returns true on success.
kv:clear() -> bool

Lua functions for external databases

// Query a PostgreSQL database with a SQL query and a connection string
PQ([string], [string]) -> table

The default connection string is host=localhost port=5432 user=postgres dbname=test sslmode=disable and the default SQL query is SELECT version(). Database connections are re-used if they still answer to .Ping(), for the same connection string.

// Query a MSSQL database with SQL, a connection string, and a parameter table
MSSQL([string], [string], [table]) -> table
  • The default connection string is server=localhost;user=sa;password=Password123,port=1433 and the default SQL query is "SELECT @@VERSION. Database connections are re-used if they still answer to .Ping(), for the same connection string.
  • If the param table is numerically indexed, positional placeholders are expected: MSSQL("SELECT * FROM users WHERE first = @p1 AND last = @p2", conn, {"John", "Smith"})
  • If the param table is keyed with strings, named placeholders are expected: MSSQL("SELECT * FROM users WHERE first = @first AND last = @last", conn, {first = "John", last = "Smith"})

Lua functions for handling users and permissions

// Check if the current user has "user" rights
UserRights() -> bool

// Check if the given username exists (does not look at the list of unconfirmed users)
HasUser(string) -> bool

// Check if the given username exists in the list of unconfirmed users
HasUnconfirmedUser(string) -> bool

// Get the value from the given boolean field
// Takes a username and field name
BooleanField(string, string) -> bool

// Save a value as a boolean field
// Takes a username, field name and boolean value
SetBooleanField(string, string, bool)

// Check if a given username is confirmed
IsConfirmed(string) -> bool

// Check if a given username is logged in
IsLoggedIn(string) -> bool

// Check if the current user has "admin rights"
AdminRights() -> bool

// Check if a given username is an admin
IsAdmin(string) -> bool

// Get the username stored in a cookie, or an empty string
UsernameCookie() -> string

// Store the username in a cookie, returns true on success
SetUsernameCookie(string) -> bool

// Clear the login cookie
ClearCookie()

// Get a table containing all usernames
AllUsernames() -> table

// Get the email for a given username, or an empty string
Email(string) -> string

// Get the password hash for a given username, or an empty string
PasswordHash(string) -> string

// Get all unconfirmed usernames
AllUnconfirmedUsernames() -> table

// Get the existing confirmation code for a given user,
// or an empty string. Takes a username.
ConfirmationCode(string) -> string

// Add a user to the list of unconfirmed users
// Takes a username and a confirmation code
// Remember to also add a user, when registering new users.
AddUnconfirmed(string, string)

// Remove a user from the list of unconfirmed users
// Takes a username
RemoveUnconfirmed(string)

// Mark a user as confirmed
// Takes a username
MarkConfirmed(string)

// Removes a user
// Takes a username
RemoveUser(string)

// Make a user an admin
// Takes a username
SetAdminStatus(string)

// Make an admin user a regular user
// Takes a username
RemoveAdminStatus(string)

// Add a user
// Takes a username, password and email
AddUser(string, string, string)

// Set a user as logged in on the server (not cookie)
// Takes a username
SetLoggedIn(string)

// Set a user as logged out on the server (not cookie)
// Takes a username
SetLoggedOut(string)

// Log in a user, both on the server and with a cookie
// Takes a username
Login(string)

// Log out a user, on the server (which is enough)
// Takes a username
Logout(string)

// Get the current username, from the cookie
Username() -> string

// Get the current cookie timeout
// Takes a username
CookieTimeout(string) -> number

// Set the current cookie timeout
// Takes a timeout number, measured in seconds
SetCookieTimeout(number)

// Get the current server-wide cookie secret. This is used when setting
// and getting browser cookies when users log in.
CookieSecret() -> string

// Set the current server-side cookie secret. This is used when setting
// and getting browser cookies when users log in. Using the same secret
// makes browser cookies usable across server restarts.
SetCookieSecret(string)

// Get the current password hashing algorithm (bcrypt, bcrypt+ or sha256)
PasswordAlgo() -> string

// Set the current password hashing algorithm (bcrypt, bcrypt+ or sha256)
// ‘bcrypt+‘ accepts bcrypt or sha256 for old passwords, but will only use
// bcrypt for new passwords.
SetPasswordAlgo(string)

// Hash the password
// Takes a username and password (username can be used for salting sha256)
HashPassword(string, string) -> string

// Change the password for a user, given a username and a new password
SetPassword(string, string)

// Check if a given username and password is correct
// Takes a username and password
CorrectPassword(string, string) -> bool

// Checks if a confirmation code is already in use
// Takes a confirmation code
AlreadyHasConfirmationCode(string) -> bool

// Find a username based on a given confirmation code,
// or returns an empty string. Takes a confirmation code
FindUserByConfirmationCode(string) -> string

// Mark a user as confirmed
// Takes a username
Confirm(string)

// Mark a user as confirmed, returns true on success
// Takes a confirmation code
ConfirmUserByConfirmationCode(string) -> bool

// Set the minimum confirmation code length
// Takes the minimum number of characters
SetMinimumConfirmationCodeLength(number)

// Generates a unique confirmation code, or an empty string
GenerateUniqueConfirmationCode() -> string

Lua functions that are available for server configuration files

// Set the default address for the server on the form [host][:port].
// May be useful in Algernon application bundles (.alg or .zip files).
SetAddr(string)

// Reset the URL prefixes and make everything *public*.
ClearPermissions()

// Add an URL prefix that will have *admin* rights.
AddAdminPrefix(string)

// Add a reverse proxy given a path prefix and an endpoint URL
// For example: "/api" and "http://localhost:8080"
AddReverseProxy(string, string)

// Add an URL prefix that will have *user* rights.
AddUserPrefix(string)

// Provide a lua function that will be used as the permission denied handler.
DenyHandler(function)

// Return a string with various server information.
ServerInfo() -> string

// Direct the logging to the given filename. If the filename is an empty
// string, direct logging to stderr. Returns true on success.
LogTo(string) -> bool

// Returns the version string for the server.
version() -> string

// Logs the given strings as INFO. Takes a variable number of strings.
log(...)

// Logs the given strings as WARN. Takes a variable number of strings.
warn(...)

// Logs the given string as ERROR. Takes a variable number of strings.
err(...)

// Provide a lua function that will be run once, when the server is ready to start serving.
OnReady(function)

// Use a Lua file for setting up HTTP handlers instead of using the directory structure.
ServerFile(string) -> bool

// Serve files from this directory.
ServerDir(string) -> bool

// Get the cookie secret from the server configuration.
CookieSecret() -> string

// Set the cookie secret that will be used when setting and getting browser cookies.
SetCookieSecret(string)

Functions that are only available for Lua server files

This function is only available when a Lua script is used instead of a server directory, or from Lua files that are specified with the ServerFile function in the server configuration.

// Given an URL path prefix (like "/") and a Lua function, set up an HTTP handler.
// The given Lua function should take no arguments, but can use all the Lua functions for handling requests, like `content` and `print`.
handle(string, function)

// Given an URL prefix (like "/") and a directory, serve the files and directories.
servedir(string, string)

Commands that are only available in the REPL

  • help displays a syntax highlighted overview of most functions.
  • webhelp displays a syntax highlighted overview of functions related to handling requests.
  • confighelp displays a syntax highlighted overview of functions related to server configuration.

Extra Lua functions

// Pretty print. Outputs the values in, or a description of, the given Lua value(s).
pprint(...)

// Takes a Python filename, executes the script with the `python` binary in the Path.
// Returns the output as a Lua table, where each line is an entry.
py(string) -> table

// Takes one or more system commands (possibly separated by `;`) and runs them.
// Returns the output lines as a table.
run(string) -> table

// Lists the keys and values of a Lua table. Returns a string.
// Lists the contents of the global namespace `_G` if no arguments are given.
dir([table]) -> string

Markdown

Algernon can be used as a quick Markdown viewer with the -m flag.

Try algernon -m README.md to view README.md in the browser, serving the file once on a port >3000.

In addition to the regular Markdown syntax, Algernon supports setting the page title and syntax highlight style with a header comment like this at the top of a Markdown file:

<!--
title: Page title
theme: dark
code_style: lovelace
replace_with_theme: default_theme
-->

Code is highlighted with highlight.js and several styles are available.

The string that follows replace_with_theme will be used for replacing the current theme string (like dark) with the given string. This makes it possible to use one image (like logo_default_theme.png) for one theme and another image (logo_dark.png) for the dark theme.

The theme can be light, dark, redbox, bw, github, wing, material, neon, default, werc or a path to a CSS file. Or style.gcss can exist in the same directory.

An overview of available syntax highlighting styles can be found at the Chroma Style Gallery.

HTTPS certificates with Let's Encrypt and Algernon

Method 1

Follow the guide at certbot.eff.org for the "None of the above" web server, then start algernon with --cert=/etc/letsencrypt/live/myhappydomain.com/cert.pem --key=/etc/letsencrypt/live/myhappydomain.com/privkey.pem where myhappydomain.com is replaced with your own domain name.

First make Algernon serve a directory for the domain, like /srv/myhappydomain.com, then use that as the webroot when configuring certbot with the certbot certonly command.

Remember to set up a cron-job or something similar to run certbot renew every once in a while (every 12 hours is suggested by certbot.eff.org). Also remember to restart the algernon service after updating the certificates.

Method 2

Use the --letsencrypt flag together with the --domain flag to automatically fetch and use certificates from Let's Encrypt.

For instance, if /srv/myhappydomain.com exists, then algernon --letsencrypt --domain /srv can be used to serve myhappydomain.com if it points to this server, and fetch certificates from Let's Encrypt.

When --letsencrypt is used, it will try to serve on port 443 and 80 (which redirects to 443).

Releases

Requirements

  • go 1.21 or later is a requirement for building Algernon.
  • For go 1.10, 1.11, 1.12, 1.13, 1.14, '1.15, 1.16+gcc-go <10version1.12.7` of Algernon is the last supported version.

Access logs

Can log to a Combined Log Format access log with the --accesslog flag. This works nicely together with goaccess.

Example usage

Serve files in one directory:

algernon --accesslog=access.log -x

Then visit the web page once, to create one entry in the access.log.

The wonderful goaccess utility can then be used to view the access log, while it is being filled:

goaccess --no-global-config --log-format=COMBINED access.log

If you have goaccess setup correctly, running goaccess without any flags should work too:

goaccess access.log

.alg files

.alg files are just renamed .zip files, that can be served by Algernon. There is an example application here: wercstyle.

Logo license

Thanks to Egon Elbre for the two SVG drawings that I remixed into the current logo (CC0 licensed).

Listening to port 80 without running as root

For Linux:

sudo setcap cap_net_bind_service=+ep /usr/bin/algernon

Other resources

General information

Stargazers over time

Stargazers over time

0-0

The jump in stargazers happened when Algernon reached the front page of Hacker News:

algernon's People

Contributors

arimal199 avatar bn4t avatar chenrui333 avatar dependabot[bot] avatar felixonmars avatar giuliolunati avatar jamacku avatar jc00ke avatar mischief avatar mohamed--abdel-maksoud avatar philippgille avatar stefanb avatar testwill avatar tooolbox avatar xyproto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

algernon's Issues

reduce external dependencies?

it is possible to reduce the external dependcy like this?

return `<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/` + HighlightJSversion + `/styles/` + codeStyle + `.min.css"><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/` + HighlightJSversion + `/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script>`

I like your project, but hard-coded external dependencies are not acceptable to me. :}

Teal Support

Might be interesting to support Teal so that you can have typed lua code. Would make it easier to build larger, more complex apps with Algernon.

Disclaimer: I am far more experienced with Go, and even somewhat with TS, compared to Lua.

Parity with command-line options and serverconf.lua

I'm currently using a shell script to execute algernon, because I don't know how to translate the command line options into the serverconf.lua, or know if there even is a way to access some of the command-line flags from the conf file. Here is what I'm using. Would it be possible to have parallel functions in serverconf.lua available which align to these options? Do they already exist but are just not documented? It would great for cross-platform compatibility if I could just use the serverconf.lua and not have to have the launch script.

#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

"$DIR/algernon" \
  --dir="$DIR/srv" \
  --boltdb="$DIR/data.bolt" \
  --key="$DIR/key.pem" \
  --cert="$DIR/cert.pem" \
  --dev \
  --autorefresh \
  --cookiesecret="9jc9djcd000dcd"

trouble with auto-refresh

when trying various combinations of options, unable to get auto-refresh to work.
Safari gives:
[Error] Refused to connect to http://127.0.0.1:5553/fs because it does not appear in the connect-src directive of the Content Security Policy.
Chrome gives:
localhost/:1 Uncaught DOMException: Failed to construct 'EventSource': Refused to connect to 'http://localhost:5553/fs' because it violates the document's Content Security Policy. at http://localhost:3000/:1:922

Amber include and extend

Hi xyproto,

I really like this project, having fun with it atm.

I just stumbled across not being able to use Amber's import and extend features. It would be so helpful for the general layout.

Do you think it would be possible to enable them?

Greets,
Ed

EDIT: The error is:

Amber Error: Unable to import or extend nav in a non filesystem based parser.

server port changed

The port used for the Algernon mac application has changed from 3000 to 4000 and I can't change it back.

I know it happened because I started Algernon from the command line once. Now I can't change it back. I'm sure I can dig around the code but it's easier to ask. Sorry.

Login cookies clear after server restart

If a user has been logged in using SetUsernameCookie/SetLoggedIn but then we restart the algernon server, UsernameCookie no longer returns the logged in username. Is there a way around this? We'd like the server to retain logins (or at least re-use the set cookie) after reboot.

Thanks!!

algernon 1.12.11 failed to build on apple silicon

👋 it looks like algernon 1.12.11 failed to build on apple silicon as error log show below:

/usr/bin/sandbox-exec -f /private/tmp/homebrew20210102-35928-hbkxt1.sb ruby -W0 -I $LOAD_PATH -- /opt/homebrew/Library/Homebrew/test.rb /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/algernon.rb --verbose
panic: qtls.ClientHelloInfo doesn't match

goroutine 1 [running]:
github.com/marten-seemann/qtls-go1-15.init.0()
	github.com/marten-seemann/[email protected]/unsafe.go:20 +0x1b4
==> curl -sIm3 -o- http://localhost:53111

Error: algernon: failed
An exception occurred within a child process:
  Test::Unit::AssertionFailedError: <0> expected but was
<7>.

build error log, https://github.com/Homebrew/homebrew-core/runs/1638106915
relates to Homebrew/homebrew-core#68188

Modularizing project

Hi,

Very interesting project.

I see the focus tends to be towards lua, but what if I don't wish to use lua?

Second thing I wish to bring to your notice is that fasthttp is probably better than net/http so maybe you could migrate to that?

Regards :)

Consider Esbuild Integration

Esbuild is a pure-Go JS bundler with syntax lowering features.

  1. One of the features of Algernon is JSX transformation, using goja-babel. Replacing this with Esbuild could see dramatic performance improvements.
  2. By integrating Esbuild into Algernon, it could do on-the-fly (or cached) processing, including bundling, typescript stripping, the aforementioned JSX transforms, and lowering to ES6.

I could see general integration being achieved in a few ways:

  • Exposing the Esbuild API to Lua so you can call it from handler code.
  • Perhaps, in the matter of .lua or .tmpl, a .esbuild file extension which signals Algernon to use it as an entry point.
  • A local config.esbuild file which tells Algernon how to configure Esbuild for a particular directory.

redirect() and status() not setting HTTP status?

I've been trying to get a simple webapp up and running with Algernon, but I can't seem to get the redirect() and status() Lua functions to work. The problem appears to be that although they set the Location: header correctly, they don't set the HTTP status (it's always 200), so no redirect.

Here's /logout/index.lua:

if Username() ~= '' then
    Logout(Username())
end

redirect('http://localhost:3000/login/')
-- status(302)
-- setheader('Location', 'http://localhost:3000/login/')

And here's what httpie says:

# http http://localhost:3000/logout/
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: text/html; charset=utf-8
Date: Tue, 12 Jul 2016 18:41:24 GMT
Location: http://localhost:3000/login/
Server: Algernon 1.0
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block

<a href="http://localhost:3000/login/">Moved Permanently</a>.

I had a look at the source code, but I couldn't figure it out.

Additionally, I think 301 (Moved Permanently) should probably be changed to 302 (Found). I believe that if you do, say, a 301 redirect from your logout page to your homepage, on subsequent attempts to visit /logout, the browser might skip that URL and go directly to /.

Update samples

  • Update the JS in the samples to the latest version of React.
  • This might also need a small adjustment to the JSX engine.

Streaming large files

Algernon uses too much memory when serving large files (like 500MB audio files). This might be related to caching. Please fix.

libc.so.6: version `GLIBC_2.32' not found

I am currently revising my ansible roles for algernon and creating various tests with different operating systems.
In the process I noticed that algernon as of 1.12.11 does not work with CentOS 8, OracleLinux 8, debain9/10, ubuntu 20.04.

Here I get the following error:

# /usr/local/bin/algernon --help
/usr/local/bin/algernon: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /usr/local/bin/algernon)
  • CentOS and OracleLinux ship with a glibc 2.28:
# rpm -qa | grep glibc
glibc-2.28-127.el8.x86_64

With Debian it looks similar:

  • debian9:
# dpkg -l | grep libc6
ii libc6:amd64 2.24-11+deb9u4
  • ubuntu 20.04
# dpkg -l | grep libc6
ii libc6:amd64 2.31-0ubuntu9.1

Up to version 1.12.8 all versions worked fine.

Were there such profound changes that a glibc > 2.31 is needed?

algernon -l to execute lua script

Currently algernon does not execute the lua script passed to -l, it would be useful for development if -l runs the lua script or string that's passed to it(- for stdin), much like the lua repl.

jfile:get() cannot handle non-string fields

Algernon 0.87
Ready
lua> jf = JFile("test.json")
lua> print(tostring(jf))
{
  "desc": "Hello World!",
  "ping": 50,
  "status": true
}
lua> jf:get("desc")
Hello World!
lua> jf:get("ping")

lua> jf:get("status")

lua> 

Perhaps some form of casting is needed in jnodeGetNode()..?

Support for raw SQL when using PostgreSQL or MariaDB/MySQL

It's not clear how the DB integration works-

Do you have to use the built in methods to write/access data or can you write SQL queries? Or do you have to write Lua code to make the connection? Also, how to imports/require work for external Lua modules?

Thanks

Add HTTP client function (GET/POST/etc.)

Would it be possible to add a function inside of Lua for http GET, POST, etc.? This could be used for:

  • building a CORS proxy (pass through requests)
  • building OpenID Connect / OAuth2 authentication where the server needs to confirm the authentication keys directly with the provider
  • accessing any non-JSON-based APIs (similar to how jnode does it today)

I actually have a need for all 3 of these things. Could be built using a plugin, but it feels like something that would be relatively easy to build in and provide a lot of potential functionality.

algernon 1.12.5 does not build anymore

We currently cannot build algernon as part of Homebrew:

==> go build -o algernon
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
go: downloading github.com/xyproto/permissionbolt v0.0.0-20190822174405-70061863efdb
go: downloading github.com/go-gcfg/gcfg v1.2.3
go: downloading github.com/xyproto/permissions2 v0.0.0-20190729074010-6510c7590749
go: downloading github.com/xyproto/term v0.3.1-0.20190822162330-fddaac69bf95
go: downloading github.com/xyproto/simpleredis v0.0.0-20181004131423-f2c3a2cf62d0
go: downloading github.com/lucas-clemente/quic-go v0.12.0
go: downloading github.com/xyproto/recwatch v0.0.0-20190815131735-c8f6c928dd10
go: downloading github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
go: extracting github.com/sirupsen/logrus v1.4.2
go: extracting github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
go: extracting github.com/xyproto/recwatch v0.0.0-20190815131735-c8f6c928dd10
go: downloading github.com/xyproto/sheepcounter v1.6.0
go: extracting github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
go: extracting github.com/xyproto/permissionbolt v0.0.0-20190822174405-70061863efdb
go: extracting github.com/xyproto/term v0.3.1-0.20190822162330-fddaac69bf95
go: extracting github.com/xyproto/simpleredis v0.0.0-20181004131423-f2c3a2cf62d0
go: extracting github.com/go-gcfg/gcfg v1.2.3
verifying github.com/lucas-clemente/[email protected]: checksum mismatch
	downloaded: h1:TRbvZ6F++sofeGbh+Z2IIyIOhl8KyGnYuA06g2yrHdI=
	go.sum:     h1:dYHUyB50gEQlK3KqytmNySzuyzAcaQ3iuI2ZReAfVrE=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

tag 1.12.5 can no longer be built

I'm trying to rebuild my container in the middle of the same error again and again

all modules verified
go: downloading github.com/sirupsen/logrus v1.4.2
.
.
.
go: extracting github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
verifying github.com/lucas-clemente/[email protected]: checksum mismatch
        downloaded: h1:TRbvZ6F++sofeGbh+Z2IIyIOhl8KyGnYuA06g2yrHdI=
        go.sum:     h1:dYHUyB50gEQlK3KqytmNySzuyzAcaQ3iuI2ZReAfVrE=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

I use go 1.13 as build environment

Problem serving files with % in filename

For example hello%world.txt results in 400 Bad Request and hello%20world.txt results in File not found: ./hello world.txt.
Expected result is that these files are served correctly.

please vendor dependencies

please vendor the dependencies of algernon, so that it is less likely to break when dependencies change.

glide is a great tool for this.

if you don't wish to vendor dependencies directly in algernon (which i would recommend you do), please at least create package log files with e.g. glide, so that dependency versions are pinned.

broken links with "--dir"

'algernon --dir .' creates proper links to the files in the current folder, but 'algernon --dir ./' creates broken links: each linked file's first char has been removed. A file called "foo" is linked as "oo". I confirmed this with versions 1.12.5 and 1.12.6 on Linux.

reading directories

it is desirable to be able to read entries of directories for generating e.g. menus or custom directory listings.

i can send a PR for a simple implementation i came up with, but would you prefer something else?

diff --git a/basic.go b/basic.go
index e33fdef..265fdd3 100644
--- a/basic.go
+++ b/basic.go
@@ -99,6 +99,32 @@ func exportBasicSystemFunctions(L *lua.LState) {
        return 1 // number of results
    }))

+   L.SetGlobal("ls", L.NewFunction(func(L *lua.LState) int {
+       cwd, _ := os.Getwd()
+       dir := path.Clean(path.Join(cwd, L.ToString(1)))
+       d, err := os.Open(dir)
+       if err != nil {
+           L.RaiseError("failed to open %q: %v", err)
+       }
+       fi, err := d.Readdir(0)
+       if err != nil {
+           d.Close()
+           L.RaiseError("failed to read %q: %v", err)
+       }
+
+       luaTable := L.NewTable()
+       for _, f := range fi {
+           fit := L.NewTable()
+           L.RawSet(fit, lua.LString("name"), lua.LString(f.Name()))
+           L.RawSet(fit, lua.LString("size"), lua.LNumber(f.Size()))
+           L.RawSet(fit, lua.LString("dir"), lua.LBool(f.IsDir()))
+
+           luaTable.Append(fit)
+       }
+       L.Push(luaTable)
+       return 1 // number of results
+   }))
+
 }

 // Make functions related to HTTP requests and responses available to Lua scripts.

Bug: JSON function ignores boolean values

Let's say I want to create this JSON:

{
    "success": true,
    "value": 123
}

I would do this:

-- endpoint.lua
json({
    success = true,
    value = 123,
})

But I get this:

{
    "value": 123
}

The conversion doesn't seem to make allowance for boolean values.

tag 1.12.0 can no longer be built

I'm trying to rebuild my container in the middle of the same error again and again

env GO111MODULE=on go build -v -v
go: finding github.com/Joker/jade v0.7.0
go: finding github.com/kataras/iris v10.7.0+incompatible
go: github.com/Joker/[email protected]: unknown revision v0.7.0
go: github.com/kataras/[email protected]+incompatible: unknown revision v10.7.0
go: error loading module requirements

version 10.7.0 of kataras/iris is no longer available: https://github.com/kataras/iris/tags

Is there a quick fix (unfortunately I'm not so well versed in the go universe yet)?

Bug: Debug mode breaks redirect()

Running Algernon with --dev enables debug mode, which buffers Lua output to allow pretty-printed error pages.

Unfortunately this breaks the redirect() Lua function. The browser gets a 302 response but doesn't redirect. If you have a GET request and don't otherwise output anything, Go will add a "Found" hyperlink to the location you specified, but this is not adequate.

pongo not injecting lua lists when using serve2()

Using Algernon 1.12.2. If I create an empty folder with these two files:

index.po2:

TEXT TEST: {{ testtext }}
{% for k, v in testlist %}
LIST TEST: {{ v }}
{% endfor %}

data.lua:

testtext = "TEST"
testlist = { "ITEM_1", "ITEM_2" }

When I browse to the folder it works great:

TEXT TEST: TEST
LIST TEST: ITEM_1
LIST TEST: ITEM_2

HOWEVER, when I add the following file:

index.lua:

serve2("index.po2", { testtext="TEST", testlist={ "ITEM_1", "ITEM_2"} })

If I restart the server, and refresh the folder in the browser, I instead get this:

TEXT TEST: TEST

If doesn't show the list, only the text. It doesn't seem to detect that testlist has contents.

Thoughts? I can't seem to find a workaround.

Thanks!

Markdown not parsing reference links

I added a second place with same link, so changed it to a reference link:

[ROWeb]:(http://algernon.roboticoverlords.org/)

And what Algernon parsed that to was:

/Users/buildslave/Library/Containers/org.roboticoverlords.algernon/Data/Documents/Algernon/(http:/algernon.roboticoverlords.org/)

panic: qtls.ClientSessionState not compatible with tls.ClientSessionState on MacOS 10.14.4 and go 1.11.4

When I tried to run Algernon I got this error: panic: qtls.ClientSessionState not compatible with tls.ClientSessionState. Seems to compile fine under Go 1.11.4.

Steps to reproduce:

$ go get -u github.com/xyproto/algernon
$ cd xyproto/algernon
$ env GO111MODULE=on go build
$ ./algernon -e

Result:

panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.0()
	/Users/tom/go/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/unsafe.go:20 +0x113

System: 2018 iMac running MacOS 10.14.4 with plenty of free RAM and disk space.

Can't wait to give Algernon a try!

Bug: Multiple Processes Per Plugin

I wrote a Go plugin modeled precisely on your example.

Based on my testing, plugins are launched as processes and are never shut down, meaning a new instance is spawned every time a plugin function is called, and the old instances don't shut down. I noticed you have a concern about data races surrounding shutdown?

Spawning infinite plugin instances is not an option for me. Can this be fixed?

MSSQL Query Support

I quite like the server you've put together, it checks a few boxes I'm interested in for a particular project.

I see you have PQ() for doing arbitrary Postgres queries. I need to support MSSQL; perhaps we could add a MSQ() function? Seems straightforward, basically copying lua/pquery/pquery.go and importing the appropriate driver.

Let me know what you think.

Lua Local Require

I noted that require() is relative to Algernon's root run location, even when the currently active Lua file is somewhere else, such as a data.lua or index.lua in my/webapp/path/.

Because of this, there's currently no good way to do ad-hoc code modularization. Using the code lib feature, or require(), both necessitate installing these things as globals within the system. If I want to just modularize some Lua code within a particular folder/Algernon app, I'm not sure how to do that.

@xyproto what do you think of the concept of making require() relative to the location of the file of Lua code that's being executed? I suppose there would be some scenarios where you want to pull in a global module that you installed, as well...

The vegeta benchmark triggers a crash in the code that handles Lua scripts

I try to use https://github.com/tsenart/vegeta do benchmark... it will really easy crash just 500 clients.

echo "GET http://127.0.0.1:3000/counter/" | vegeta attack -rate=500 -duration=30s | tee results.bin | vegeta report

The logs:

-> % ./welcome.sh
Try editing the markdown file in samples/welcome and see the
results instantly in the browser at http://localhost:3000/





	Algernon 1.12.2
	QUIC Web Server




-------------------------------------------------
-> serverconf.lua
Server directory:	samples/welcome
Server address:		:3000
Database:		Bolt (/tmp/algernon.db)
Options:		[Debug, Auto-refresh, Dev, Server]
Cache mode:		Off
Event server:		:5553
Request limit:		Off
Server configuration:	[serverconf.lua]
Large file threshold:	44040192 bytes
Large file timeout:	10 sec
-------------------------------------------------
INFO[0006] Serving HTTP on http://localhost:3000/
fatal error: concurrent map read and map write

goroutine 420 [running]:
runtime.throw(0x1027327, 0x21)
	/usr/local/go/src/runtime/panic.go:608 +0x72 fp=0xc010e98108 sp=0xc010e980d8 pc=0x42d582
runtime.mapaccess2_faststr(0xea7580, 0xc00a2c29f0, 0xc01106eaa0, 0x8, 0x1c1f260, 0xc0100f2720)
	/usr/local/go/src/runtime/map_faststr.go:110 +0x458 fp=0xc010e98178 sp=0xc010e98108 pc=0x414148
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LTable).RawGetString(...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/table.go:309
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).getFieldString(0xc01097c5a0, 0x12251c0, 0xc00e1bbaa0, 0xc01106eaa0, 0x8, 0x0, 0xc0108ec1c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:919 +0x4fd fp=0xc010e98230 sp=0xc010e98178 pc=0x784bed
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func7(0xc01097c5a0, 0x18000000, 0xc00fe3a000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:303 +0xa5 fp=0xc010e98288 sp=0xc010e98230 pc=0x79d515
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc01097c5a0, 0xc00fe3a000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda fp=0xc010e982b8 sp=0xc010e98288 pc=0x798e4a
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc01097c5a0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247 fp=0xc010e983a8 sp=0xc010e982b8 pc=0x7841c7
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc01097c5a0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48 fp=0xc010e983d8 sp=0xc010e983a8 pc=0x78a4b8
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc01097c5a0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda fp=0xc010e98428 sp=0xc010e983d8 pc=0x78a5aa
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299 fp=0xc010e985b8 sp=0xc010e98428 pc=0xdd03f9
runtime.call64(0xc00a54cbd0, 0xc0121f81e0, 0xc0108ec980, 0x1800000038)
	/usr/local/go/src/runtime/asm_amd64.s:523 +0x3b fp=0xc010e98608 sp=0xc010e985b8 pc=0x45ba7b
reflect.Value.call(0xe996c0, 0xc0121f81e0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454 fp=0xc010e988d0 sp=0xc010e98608 pc=0x4c3ac4
reflect.Value.Call(0xe996c0, 0xc0121f81e0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25eb00, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4 fp=0xc010e98938 sp=0xc010e988d0 pc=0x4c3554
text/template.call(0xea2f60, 0xc00a695340, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0 fp=0xc010e98ab8 sp=0xc010e98938 pc=0x9543e0
runtime.call128(0xc00a54cb40, 0x1093fe8, 0xc0100f2660, 0x3000000058)
	/usr/local/go/src/runtime/asm_amd64.s:524 +0x52 fp=0xc010e98b48 sp=0xc010e98ab8 pc=0x45bb12
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc0110fcde0, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454 fp=0xc010e98e10 sp=0xc010e98b48 pc=0x4c3ac4
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc0110fcde0, 0x1, 0x1, 0x1225d40, 0xc010bf75c0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4 fp=0xc010e98e78 sp=0xc010e98e10 pc=0x4c3554
text/template.(*state).evalCall(0xc010e994c8, 0xec0b40, 0xc0113e4000, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc010bf7560, 0xc0103421eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd fp=0xc010e99070 sp=0xc010e98e78 pc=0x94e53d
text/template.(*state).evalFunction(0xc010e994c8, 0xec0b40, 0xc0113e4000, 0x15, 0xc010bf7590, 0x1225cc0, 0xc010bf7560, 0xc0110fcba0, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172 fp=0xc010e99168 sp=0xc010e99070 pc=0x94ce82
text/template.(*state).evalCommand(0xc010e994c8, 0xec0b40, 0xc0113e4000, 0x15, 0xc010bf7560, 0xec12c0, 0x1c1f5f8, 0x99, 0xc010e99318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9 fp=0xc010e99238 sp=0xc010e99168 pc=0x94bbe9
text/template.(*state).evalPipeline(0xc010e994c8, 0xec0b40, 0xc0113e4000, 0x15, 0xc0100f25a0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126 fp=0xc010e99328 sp=0xc010e99238 pc=0x94b0d6
text/template.(*state).walk(0xc010e994c8, 0xec0b40, 0xc0113e4000, 0x15, 0x1225bc0, 0xc010bf75f0)
	/usr/local/go/src/text/template/exec.go:254 +0x49b fp=0xc010e993b8 sp=0xc010e99328 pc=0x949a2b
text/template.(*state).walk(0xc010e994c8, 0xec0b40, 0xc0113e4000, 0x15, 0x1225e00, 0xc010bf7350)
	/usr/local/go/src/text/template/exec.go:262 +0x142 fp=0xc010e99448 sp=0xc010e993b8 pc=0x9496d2
text/template.(*Template).execute(0xc0108ec6c0, 0x1213640, 0xc0111e6a10, 0xec0b40, 0xc0113e4000, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215 fp=0xc010e99520 sp=0xc010e99448 pc=0x9490a5
text/template.(*Template).Execute(0xc0108ec6c0, 0x1213640, 0xc0111e6a10, 0xec0b40, 0xc0113e4000, 0xc011133b00, 0xc011133b10)
	/usr/local/go/src/text/template/exec.go:200 +0x53 fp=0xc010e99568 sp=0xc010e99520 pc=0x948e63
html/template.(*Template).Execute(0xc010bf7020, 0x1213640, 0xc0111e6a10, 0xec0b40, 0xc0113e4000, 0xc012310001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c fp=0xc010e995b0 sp=0xc010e99568 pc=0x96845c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011dc6020, 0xc011dce100, 0xc0120e2570, 0x23, 0xc01231e370, 0xb0, 0xb0, 0xc0113e4000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467 fp=0xc010e99798 sp=0xc010e995b0 pc=0xdbdf17
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011dc6020, 0xc011dce100, 0xc0120e2570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6 fp=0xc010e99b08 sp=0xc010e99798 pc=0xdafb56
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011dc6020, 0xc011dce100, 0x7ffe0ceb862e, 0xf, 0xc0120d0060, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8 fp=0xc010e99be8 sp=0xc010e99b08 pc=0xda8208
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0120da000, 0xc011dce100)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e fp=0xc010e99ce0 sp=0xc010e99be8 pc=0xdcf96e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0120da000, 0xc011dce100)
	/usr/local/go/src/net/http/server.go:1964 +0x44 fp=0xc010e99d08 sp=0xc010e99ce0 pc=0x69c744
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0120da000, 0xc011dce100)
	/usr/local/go/src/net/http/server.go:2361 +0x127 fp=0xc010e99d48 sp=0xc010e99d08 pc=0x69e3f7
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0120da000, 0xc011dce100)
	/usr/local/go/src/net/http/server.go:2741 +0xab fp=0xc010e99d78 sp=0xc010e99d48 pc=0x69f3ab
net/http.(*conn).serve(0xc011d980a0, 0x12230c0, 0xc011db8240)
	/usr/local/go/src/net/http/server.go:1847 +0x646 fp=0xc010e99fc8 sp=0xc010e99d78 pc=0x69b7a6
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc010e99fd0 sp=0xc010e99fc8 pc=0x45d711
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 1 [chan send]:
github.com/xyproto/algernon/engine.(*Config).Serve(0xc00057c000, 0xc00a2c2510, 0xc00021f980, 0xc00021f920, 0xfcde4e, 0x5)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/serve.go:274 +0x29f
github.com/xyproto/algernon/engine.(*Config).MustServe(0xc00057c000, 0xc00a2c2510, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/config.go:840 +0x7bf
main.main()
	/home/ubuntu/go/src/github.com/xyproto/algernon/main.go:34 +0xcd

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
	/usr/local/go/src/runtime/sigqueue.go:139 +0x9c
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
	/usr/local/go/src/os/signal/signal_unix.go:29 +0x41

goroutine 10 [syscall]:
syscall.Syscall6(0xe8, 0x7, 0xc00a3a9cf4, 0x7, 0xffffffffffffffff, 0x0, 0x0, 0x6320726176202020, 0x745f203d2065646f, 0x646f635f2e736968)
	/usr/local/go/src/syscall/asm_linux_amd64.s:44 +0x5
github.com/xyproto/algernon/vendor/golang.org/x/sys/unix.EpollWait(0x7, 0xc00a3a9cf4, 0x7, 0x7, 0xffffffffffffffff, 0x42c7d3, 0xc00a3a9cf0, 0x6946656372756f73)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go:1689 +0x72
github.com/xyproto/algernon/vendor/github.com/fsnotify/fsnotify.(*fdPoller).wait(0xc0089a0900, 0x1092600, 0xc0089a0900, 0x636145726f662e29)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/fsnotify/fsnotify/inotify_poller.go:86 +0x91
github.com/xyproto/algernon/vendor/github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc00a2bafa0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/fsnotify/fsnotify/inotify.go:192 +0x195
created by github.com/xyproto/algernon/vendor/github.com/fsnotify/fsnotify.NewWatcher
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/fsnotify/fsnotify/inotify.go:59 +0x1a8

goroutine 11 [select]:
github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch.CollectFileChangeEvents.func1(0xc0019f3400, 0xc00a354360, 0xc0001f3198, 0x14dc9380)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch/eventserver.go:74 +0xe5
created by github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch.CollectFileChangeEvents
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch/eventserver.go:72 +0x82

goroutine 12 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221e30, 0x72, 0x0)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc008cba018, 0x72, 0xc004c8ab00, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc008cba018, 0xffffffffffffff00, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Accept(0xc008cba000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:384 +0x1a0
net.(*netFD).accept(0xc008cba000, 0xc000508380, 0x30, 0x30)
	/usr/local/go/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc0012d6020, 0x50, 0x7f4e1d25d6c0, 0x0)
	/usr/local/go/src/net/tcpsock_posix.go:139 +0x2e
net.(*TCPListener).AcceptTCP(0xc0012d6020, 0x40e348, 0x30, 0xf57200)
	/usr/local/go/src/net/tcpsock.go:247 +0x47
net/http.tcpKeepAliveListener.Accept(0xc0012d6020, 0xf57200, 0xc00a3741b0, 0xeb3c20, 0x1bdf160)
	/usr/local/go/src/net/http/server.go:3232 +0x2f
net/http.(*Server).Serve(0xc00a380000, 0x1222b00, 0xc0012d6020, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:2826 +0x22f
net/http.(*Server).ListenAndServe(0xc00a380000, 0xc00a380000, 0x3)
	/usr/local/go/src/net/http/server.go:2764 +0xb6
github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch.EventServer.func1(0xfcaf1e, 0x3, 0xc00a342510, 0xc00a354360, 0x14dc9380, 0xfca861, 0x1, 0xfcde4e, 0x5)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch/eventserver.go:208 +0xfc
created by github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch.EventServer
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/recwatch/eventserver.go:200 +0x182

goroutine 13 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221f00, 0x72, 0x0)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc008ca2118, 0x72, 0xc004c8b300, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc008ca2118, 0xffffffffffffff00, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Accept(0xc008ca2100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:384 +0x1a0
net.(*netFD).accept(0xc008ca2100, 0x1093f10, 0xc00a2c4600, 0xc00a2c45a0)
	/usr/local/go/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc0001f31a0, 0x5c571c6a, 0xc00a367d18, 0x1228d40)
	/usr/local/go/src/net/tcpsock_posix.go:139 +0x2e
net.(*TCPListener).Accept(0xc0001f31a0, 0xc00a367d68, 0x18, 0xc00c391800, 0x69f8e5)
	/usr/local/go/src/net/tcpsock.go:260 +0x47
net/http.(*Server).Serve(0xc00a344f70, 0x1222080, 0xc0001f31a0, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:2826 +0x22f
github.com/xyproto/algernon/vendor/github.com/tylerb/graceful.(*Server).Serve(0xc00a2c45a0, 0x1222080, 0xc0001f31a0, 0x1222080, 0xc0001f31a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/tylerb/graceful/graceful.go:309 +0x2ef
github.com/xyproto/algernon/vendor/github.com/tylerb/graceful.(*Server).ListenAndServe(0xc00a2c45a0, 0xc00a2c2510, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/tylerb/graceful/graceful.go:147 +0xa1
github.com/xyproto/algernon/engine.(*Config).Serve.func1(0xc00021fa40, 0xc00057c000, 0xc00a354369, 0xc00a2c2510)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/serve.go:141 +0x1d4
created by github.com/xyproto/algernon/engine.(*Config).Serve
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/serve.go:122 +0x102

goroutine 14 [runnable]:
github.com/xyproto/algernon/vendor/github.com/tylerb/graceful.(*Server).manageConnections(0xc00a2c45a0, 0xc00021fb00, 0xc00021fb60, 0xc00021fbc0, 0xc00021fc20, 0xc00021fc80, 0xc00021fce0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/tylerb/graceful/graceful.go:366 +0x2da
created by github.com/xyproto/algernon/vendor/github.com/tylerb/graceful.(*Server).Serve
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/tylerb/graceful/graceful.go:297 +0x220

goroutine 66 [chan receive]:
github.com/xyproto/algernon/vendor/github.com/tylerb/graceful.(*Server).handleInterrupt(0xc00a2c45a0, 0xc00a315bc0, 0xc0000b4180, 0x1222080, 0xc0001f31a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/tylerb/graceful/graceful.go:422 +0x41
created by github.com/xyproto/algernon/vendor/github.com/tylerb/graceful.(*Server).Serve
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/tylerb/graceful/graceful.go:305 +0x2c1

goroutine 40 [runnable]:
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LTable).RawSetString(...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/table.go:205
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).setFieldString(0xc00a2c4460, 0x12251c0, 0xc00e1bbaa0, 0xffb848, 0xe, 0x1225100, 0xc010ab6a80)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:983 +0x906
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).SetField(0xc00a2c4460, 0x12251c0, 0xc00e1bbaa0, 0xffb848, 0xe, 0x1225100, 0xc010ab6a80)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1516 +0x67
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).SetGlobal(0xc00a2c4460, 0xffb848, 0xe, 0x1225100, 0xc010ab6a80)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1532 +0x7e
github.com/xyproto/algernon/engine.(*Config).LoadServerConfigFunctions(0xc00057c000, 0xc00a2c4460, 0xc01221e100, 0x20, 0xc00a2c4460, 0xc01221e100)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/serverconf.go:128 +0x506
github.com/xyproto/algernon/engine.(*Config).LoadCommonFunctions(0xc00057c000, 0x1221140, 0xc012268000, 0xc01221c000, 0xc01221e100, 0x20, 0xc00a2c4460, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:46 +0x2ef
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap(0xc00057c000, 0x1221140, 0xc012268000, 0xc01221c000, 0xc01228c000, 0x1b7, 0x3b7, 0xc01221e100, 0x20, 0x0, ...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:236 +0x15f
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc012268000, 0xc01221c000, 0xc01226a570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:196 +0x1555
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc012268000, 0xc01221c000, 0x7ffe0ceb862e, 0xf, 0xc01221e060, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc012258000, 0xc01221c000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc012258000, 0xc01221c000)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc012258000, 0xc01221c000)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc012258000, 0xc01221c000)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a3c8000, 0x12230c0, 0xc000364440)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 62 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc00f3300a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00f32ffa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc0117ef6c0, 0xc00fdfb603, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc00a2c59a0, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc00a2c59a0, 0x1, 0xc011a82580)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc00a2c59a0, 0x80000003, 0xc00fe3f000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc00a2c59a0, 0xc00fe3f000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc00a2c59a0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc00a2c59a0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc00a2c59a0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011a10000, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011a10000, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25d000, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00bbbf220, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc0119a7ca0, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc0119a7ca0, 0x1, 0x1, 0x1225d40, 0xc0119ade30, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00f3314c8, 0xec0b40, 0xc00fe4fc50, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc0119addd0, 0xc0054a974b, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00f3314c8, 0xec0b40, 0xc00fe4fc50, 0x15, 0xc0119ade00, 0x1225cc0, 0xc0119addd0, 0xc0119a7b80, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00f3314c8, 0xec0b40, 0xc00fe4fc50, 0x15, 0xc0119addd0, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00f331318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00f3314c8, 0xec0b40, 0xc00fe4fc50, 0x15, 0xc00fe89c80, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00f3314c8, 0xec0b40, 0xc00fe4fc50, 0x15, 0x1225bc0, 0xc0119ade60)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00f3314c8, 0xec0b40, 0xc00fe4fc50, 0x15, 0x1225e00, 0xc0119adbc0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc01198f9c0, 0x1213640, 0xc0119c3420, 0xec0b40, 0xc00fe4fc50, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc01198f9c0, 0x1213640, 0xc0119c3420, 0xec0b40, 0xc00fe4fc50, 0xc00fe89200, 0xc00fe89210)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc0119ad890, 0x1213640, 0xc0119c3420, 0xec0b40, 0xc00fe4fc50, 0xc000030001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc000906900, 0xc00fe61800, 0xc00f36d2c0, 0x23, 0xc00003d340, 0xb0, 0xb0, 0xc00fe4fc50)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc000906900, 0xc00fe61800, 0xc00f36d2c0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc000906900, 0xc00fe61800, 0x7ffe0ceb862e, 0xf, 0xc0089a17c0, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0117bc1c0, 0xc00fe61800)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0117bc1c0, 0xc00fe61800)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0117bc1c0, 0xc00fe61800)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0117bc1c0, 0xc00fe61800)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a4e2e60, 0x12230c0, 0xc00361ab40)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 25 [runnable]:
net/textproto.MIMEHeader.Set(0xc00a3743f0, 0xfd15ac, 0x6, 0xffec65, 0xf)
	/usr/local/go/src/net/textproto/header.go:22 +0x5d
net/http.Header.Set(0xc00a3743f0, 0xfd15ac, 0x6, 0xffec65, 0xf)
	/usr/local/go/src/net/http/header.go:32 +0x53
github.com/xyproto/algernon/engine.(*Config).ServerHeaders(0xc00057c000, 0x1222300, 0xc00ea1e000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:413 +0x75
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00ea1e000, 0xc010eaa100)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:476 +0x529
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00ea1e000, 0xc010eaa100)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00ea1e000, 0xc010eaa100)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00ea1e000, 0xc010eaa100)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a444000, 0x12230c0, 0xc0004ca840)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 16 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc00ee0e0a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00ee0dfa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc011f9e900, 0xc0112adbf3, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc011236dc0, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011236dc0, 0x1, 0xc0115ff4c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc011236dc0, 0x80000003, 0xc0115e4000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011236dc0, 0xc0115e4000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011236dc0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011236dc0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011236dc0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011290870, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011290870, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25dd80, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc0082be4b0, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc01158cee0, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc01158cee0, 0x1, 0x1, 0x1225d40, 0xc011571e60, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00ee0f4c8, 0xec0b40, 0xc01133fc80, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc011571e00, 0xc00a60cf6b, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00ee0f4c8, 0xec0b40, 0xc01133fc80, 0x15, 0xc011571e30, 0x1225cc0, 0xc011571e00, 0xc01158cdc0, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00ee0f4c8, 0xec0b40, 0xc01133fc80, 0x15, 0xc011571e00, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00ee0f318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00ee0f4c8, 0xec0b40, 0xc01133fc80, 0x15, 0xc01155f980, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00ee0f4c8, 0xec0b40, 0xc01133fc80, 0x15, 0x1225bc0, 0xc011571e90)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00ee0f4c8, 0xec0b40, 0xc01133fc80, 0x15, 0x1225e00, 0xc011571bf0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc01158e8c0, 0x1213640, 0xc0115a0620, 0xec0b40, 0xc01133fc80, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc01158e8c0, 0x1213640, 0xc0115a0620, 0xec0b40, 0xc01133fc80, 0xc01155ef00, 0xc01155ef10)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc0115718c0, 0x1213640, 0xc0115a0620, 0xec0b40, 0xc01133fc80, 0xc00a5d0001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011382780, 0xc011357700, 0xc0111cb5f0, 0x23, 0xc00a5dadc0, 0xb0, 0xb0, 0xc01133fc80)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011382780, 0xc011357700, 0xc0111cb5f0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011382780, 0xc011357700, 0x7ffe0ceb862e, 0xf, 0xc00ff4e9e0, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00ee277a0, 0xc011357700)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00ee277a0, 0xc011357700)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00ee277a0, 0xc011357700)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00ee277a0, 0xc011357700)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a2c4640, 0x12230c0, 0xc000530e80)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 134 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc00ffb80a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00ffb7fa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc0112aa1a0, 0xc011ab3963, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc011c2e000, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011c2e000, 0x1, 0xc011c45400)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc011c2e000, 0x80000003, 0xc011c24000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011c2e000, 0xc011c24000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011c2e000, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011c2e000, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011c2e000, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc01112f5e0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc01112f5e0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25eb00, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a68fa20, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc011be2bc0, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc011be2bc0, 0x1, 0x1, 0x1225d40, 0xc011be8c30, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00ffb94c8, 0xec0b40, 0xc011b7aa50, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc011be8bd0, 0xc011c081eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00ffb94c8, 0xec0b40, 0xc011b7aa50, 0x15, 0xc011be8c00, 0x1225cc0, 0xc011be8bd0, 0xc011be2aa0, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00ffb94c8, 0xec0b40, 0xc011b7aa50, 0x15, 0xc011be8bd0, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00ffb9318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00ffb94c8, 0xec0b40, 0xc011b7aa50, 0x15, 0xc011bb3860, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00ffb94c8, 0xec0b40, 0xc011b7aa50, 0x15, 0x1225bc0, 0xc011be8c60)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00ffb94c8, 0xec0b40, 0xc011b7aa50, 0x15, 0x1225e00, 0xc011be89c0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc011bc6740, 0x1213640, 0xc011bb6cb0, 0xec0b40, 0xc011b7aa50, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc011bc6740, 0x1213640, 0xc011bb6cb0, 0xec0b40, 0xc011b7aa50, 0xc011bb2de0, 0xc011bb2df0)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc011be8690, 0x1213640, 0xc011bb6cb0, 0xec0b40, 0xc011b7aa50, 0xc00eb10001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011b88460, 0xc011b65700, 0xc0118ef4d0, 0x23, 0xc00eb1def0, 0xb0, 0xb0, 0xc011b7aa50)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011b88460, 0xc011b65700, 0xc0118ef4d0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011b88460, 0xc011b65700, 0x7ffe0ceb862e, 0xf, 0xc011920580, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011b0c0e0, 0xc011b65700)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011b0c0e0, 0xc011b65700)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011b0c0e0, 0xc011b65700)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011b0c0e0, 0xc011b65700)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a4454a0, 0x12230c0, 0xc005be5ac0)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 31 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc00eb3e0a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00eb3dfa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc0117ef100, 0xc011838183, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc011088c80, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011088c80, 0x1, 0xc0118ba2c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc011088c80, 0x80000003, 0xc011171000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011088c80, 0xc011171000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011088c80, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011088c80, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011088c80, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc01112e550, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc01112e550, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25eb00, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00bae5c40, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc01188e0e0, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc01188e0e0, 0x1, 0x1, 0x1225d40, 0xc011886450, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00eb3f4c8, 0xec0b40, 0xc0117e0270, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc0118863f0, 0xc010343aab, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00eb3f4c8, 0xec0b40, 0xc0117e0270, 0x15, 0xc011886420, 0x1225cc0, 0xc0118863f0, 0xc0117f1fc0, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00eb3f4c8, 0xec0b40, 0xc0117e0270, 0x15, 0xc0118863f0, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00eb3f318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00eb3f4c8, 0xec0b40, 0xc0117e0270, 0x15, 0xc0111b9ec0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00eb3f4c8, 0xec0b40, 0xc0117e0270, 0x15, 0x1225bc0, 0xc011886480)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00eb3f4c8, 0xec0b40, 0xc0117e0270, 0x15, 0x1225e00, 0xc0118861e0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc0117f5780, 0x1213640, 0xc011821f10, 0xec0b40, 0xc0117e0270, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc0117f5780, 0x1213640, 0xc011821f10, 0xec0b40, 0xc0117e0270, 0xc0111b9440, 0xc0111b9450)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc0117e1e90, 0x1213640, 0xc011821f10, 0xec0b40, 0xc0117e0270, 0xc00eb10001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011187980, 0xc0117de000, 0xc011005800, 0x23, 0xc00eb1d8c0, 0xb0, 0xb0, 0xc0117e0270)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011187980, 0xc0117de000, 0xc011005800, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011187980, 0xc0117de000, 0x7ffe0ceb862e, 0xf, 0xc010795bc0, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00eb6fb20, 0xc0117de000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00eb6fb20, 0xc0117de000)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00eb6fb20, 0xc0117de000)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00eb6fb20, 0xc0117de000)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a4446e0, 0x12230c0, 0xc0019f0580)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 42 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xc011f25201, 0xc011f24778, 0x8, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00eb41f10, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.NewKeyValue(0xc00b4a0b40, 0xc011f24778, 0x8, 0x7f4e1d26f850, 0xc00a398480, 0xdc0bb3f0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:586 +0xa6
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*BoltCreator).NewKeyValue(0xc011d94050, 0xc011f24778, 0x8, 0x10, 0x415584, 0xc00eb41fd8, 0x74af39)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/creator.go:40 +0x42
github.com/xyproto/algernon/lua/datastruct.newKeyValue(0xc0120425a0, 0x1223840, 0xc011d94050, 0xc011f24778, 0x8, 0x4215a8, 0xc00a6ca600, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:28 +0x4f
github.com/xyproto/algernon/lua/datastruct.LoadKeyValue.func1(0xc0120425a0, 0xc012240050)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:147 +0xaf
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc0120425a0, 0x0, 0xc00eb421d8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func26(0xc0120425a0, 0x7c000402, 0xc012240000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:717 +0x394
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc0120425a0, 0xc012240000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc0120425a0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc0120425a0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc0120425a0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011f0e230, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011f0e230, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d26f850, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a6b4a30, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc012044760, 0x2, 0x1, 0xfc6000, 0xc000058f70, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc012044760, 0x1, 0x1, 0x1225d40, 0xc0120b24b0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00eb434c8, 0xec0b40, 0xc011f1c2d0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc0120b2450, 0xc0120be1eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00eb434c8, 0xec0b40, 0xc011f1c2d0, 0x15, 0xc0120b2480, 0x1225cc0, 0xc0120b2450, 0xc012044640, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00eb434c8, 0xec0b40, 0xc011f1c2d0, 0x15, 0xc0120b2450, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00eb43318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00eb434c8, 0xec0b40, 0xc011f1c2d0, 0x15, 0xc011f3bc80, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00eb434c8, 0xec0b40, 0xc011f1c2d0, 0x15, 0x1225bc0, 0xc0120b24e0)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00eb434c8, 0xec0b40, 0xc011f1c2d0, 0x15, 0x1225e00, 0xc0120b2240)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc011f4b900, 0x1213640, 0xc0120009a0, 0xec0b40, 0xc011f1c2d0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc011f4b900, 0x1213640, 0xc0120009a0, 0xec0b40, 0xc011f1c2d0, 0xc011f3b200, 0xc011f3b210)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc011f1def0, 0x1213640, 0xc0120009a0, 0xec0b40, 0xc011f1c2d0, 0xc012030001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011f36000, 0xc011f1e000, 0xc011f38570, 0x23, 0xc012034160, 0xb0, 0xb0, 0xc011f1c2d0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011f36000, 0xc011f1e000, 0xc011f38570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011f36000, 0xc011f1e000, 0x7ffe0ceb862e, 0xf, 0xc011f20060, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011f2c000, 0xc011f1e000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011f2c000, 0xc011f1e000)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011f2c000, 0xc011f1e000)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011f2c000, 0xc011f1e000)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a3c80a0, 0x12230c0, 0xc000364980)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 379 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d2212d0, 0x72, 0xc00a3e0e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc010a15398, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc010a15398, 0xc010a6cf00, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc010a15380, 0xc010a6cf71, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc010a15380, 0xc010a6cf71, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc010862558, 0xc010a6cf71, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc010a6cf60)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 79 [semacquire]:
sync.runtime_SemacquireMutex(0xc00018fa24, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/mutex.go:134 +0xff
sync.(*RWMutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/rwmutex.go:93 +0x2d
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap(0xc00057c000, 0x1221140, 0xc011485dc0, 0xc010c64500, 0xc01228c400, 0x1b7, 0x3b7, 0xc011e06620, 0x20, 0x0, ...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:225 +0x5e
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011485dc0, 0xc010c64500, 0xc011e31560, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:196 +0x1555
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011485dc0, 0xc010c64500, 0x7ffe0ceb862e, 0xf, 0xc011e06580, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0120da380, 0xc010c64500)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0120da380, 0xc010c64500)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0120da380, 0xc010c64500)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0120da380, 0xc010c64500)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00eb31360, 0x12230c0, 0xc001c7acc0)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 468 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fdd10, 0x72, 0xc00a391e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc01137be98, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc01137be98, 0xc011e3e400, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc01137be80, 0xc011e3e4c1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc01137be80, 0xc011e3e4c1, 0x1, 0x1, 0xc000364a58, 0xc00a391f68, 0x473315)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00ffd0728, 0xc011e3e4c1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc011e3e4b0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 239 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xc0121fa901, 0xc011df2968, 0x8, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc010e93f10, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.NewKeyValue(0xc00b4a0b40, 0xc011df2968, 0x8, 0x7f4e1d25dd80, 0xd0, 0xd0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:586 +0xa6
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*BoltCreator).NewKeyValue(0xc011d341a8, 0xc011df2968, 0x8, 0x0, 0x1c0, 0xc010e93fd8, 0x74af39)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/creator.go:40 +0x42
github.com/xyproto/algernon/lua/datastruct.newKeyValue(0xc0121ec280, 0x1223840, 0xc011d341a8, 0xc011df2968, 0x8, 0x40dabf, 0x403a69, 0xc010e940c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:28 +0x4f
github.com/xyproto/algernon/lua/datastruct.LoadKeyValue.func1(0xc0121ec280, 0xf1c040)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:147 +0xaf
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc0121ec280, 0x0, 0x7f4e1d25dd01)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func26(0xc0121ec280, 0x7c000402, 0xc012135000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:717 +0x394
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc0121ec280, 0xc012135000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc0121ec280, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc0121ec280, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc0121ec280, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011df43c0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011df43c0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25dd80, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a6bbdb0, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc011f83720, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc011f83720, 0x1, 0x1, 0x1225d40, 0xc0121e4d20, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc010e954c8, 0xec0b40, 0xc011e3e7e0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc0121e4cc0, 0xc01200c42b, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc010e954c8, 0xec0b40, 0xc011e3e7e0, 0x15, 0xc0121e4cf0, 0x1225cc0, 0xc0121e4cc0, 0xc011f83600, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc010e954c8, 0xec0b40, 0xc011e3e7e0, 0x15, 0xc0121e4cc0, 0xec12c0, 0x1c1f5f8, 0x99, 0xc010e95318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc010e954c8, 0xec0b40, 0xc011e3e7e0, 0x15, 0xc01248c480, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc010e954c8, 0xec0b40, 0xc011e3e7e0, 0x15, 0x1225bc0, 0xc0121e4d50)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc010e954c8, 0xec0b40, 0xc011e3e7e0, 0x15, 0x1225e00, 0xc0121e4ab0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc01162cc80, 0x1213640, 0xc01223ed20, 0xec0b40, 0xc011e3e7e0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc01162cc80, 0x1213640, 0xc01223ed20, 0xec0b40, 0xc011e3e7e0, 0xc011e431a0, 0xc011e431b0)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc0119dc960, 0x1213640, 0xc01223ed20, 0xec0b40, 0xc011e3e7e0, 0xc012310001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc01162f0e0, 0xc011615600, 0xc0111cbf80, 0x23, 0xc01231e160, 0xb0, 0xb0, 0xc011e3e7e0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc01162f0e0, 0xc011615600, 0xc0111cbf80, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc01162f0e0, 0xc011615600, 0x7ffe0ceb862e, 0xf, 0xc00ff4ed40, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00ee27ce0, 0xc011615600)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00ee27ce0, 0xc011615600)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00ee27ce0, 0xc011615600)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00ee27ce0, 0xc011615600)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00fef6e60, 0x12230c0, 0xc010e04d00)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 221 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d2213a0, 0x72, 0xc00a392e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc01060ef18, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc01060ef18, 0xc0105e9900, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc01060ef00, 0xc0105e9901, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc01060ef00, 0xc0105e9901, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc010610080, 0xc0105e9901, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0105e98f0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 121 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xc011d3aa01, 0xc011c5a698, 0x8, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00ee09f10, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.NewKeyValue(0xc00b4a0b40, 0xc011c5a698, 0x8, 0x7f4e1d26ff10, 0xc00a398c00, 0xbdfb864c)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:586 +0xa6
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*BoltCreator).NewKeyValue(0xc011f10018, 0xc011c5a698, 0x8, 0x10, 0xf1c040, 0xc00ee09fd8, 0x74af39)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/creator.go:40 +0x42
github.com/xyproto/algernon/lua/datastruct.newKeyValue(0xc011d725a0, 0x1223840, 0xc011f10018, 0xc011c5a698, 0x8, 0x4215a8, 0xc00a6ab930, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:28 +0x4f
github.com/xyproto/algernon/lua/datastruct.LoadKeyValue.func1(0xc011d725a0, 0xc011df6050)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:147 +0xaf
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011d725a0, 0x0, 0xc00ee0a1d8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func26(0xc011d725a0, 0x7c000402, 0xc011df6000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:717 +0x394
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011d725a0, 0xc011df6000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011d725a0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011d725a0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011d725a0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011d040a0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011d040a0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d26ff10, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a69bd60, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc011d4cc00, 0x2, 0x1, 0xfc6000, 0xc00005afa0, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc011d4cc00, 0x1, 0x1, 0x1225d40, 0xc011d03320, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00ee0b4c8, 0xec0b40, 0xc0114532c0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc011d032c0, 0xc011da61eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00ee0b4c8, 0xec0b40, 0xc0114532c0, 0x15, 0xc011d032f0, 0x1225cc0, 0xc011d032c0, 0xc011d4cae0, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00ee0b4c8, 0xec0b40, 0xc0114532c0, 0x15, 0xc011d032c0, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00ee0b318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00ee0b4c8, 0xec0b40, 0xc0114532c0, 0x15, 0xc011d36d20, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00ee0b4c8, 0xec0b40, 0xc0114532c0, 0x15, 0x1225bc0, 0xc011d03350)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00ee0b4c8, 0xec0b40, 0xc0114532c0, 0x15, 0x1225e00, 0xc011d030b0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc011d5c4c0, 0x1213640, 0xc011d22000, 0xec0b40, 0xc0114532c0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc011d5c4c0, 0x1213640, 0xc011d22000, 0xec0b40, 0xc0114532c0, 0xc011d362a0, 0xc011d362b0)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc011d02d80, 0x1213640, 0xc011d22000, 0xec0b40, 0xc0114532c0, 0xc011d60001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011484a00, 0xc01147ec00, 0xc010657800, 0x23, 0xc011d60160, 0xb0, 0xb0, 0xc0114532c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011484a00, 0xc01147ec00, 0xc010657800, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011484a00, 0xc01147ec00, 0x7ffe0ceb862e, 0xf, 0xc00f061ca0, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011b441c0, 0xc01147ec00)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011b441c0, 0xc01147ec00)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011b441c0, 0xc01147ec00)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011b441c0, 0xc01147ec00)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00a3c8e60, 0x12230c0, 0xc001e63900)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 467 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xc011df3e01, 0xc011df3308, 0x8, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc010e9bf10, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.NewKeyValue(0xc00b4a0b40, 0xc011df3308, 0x8, 0xc010e9bff8, 0x40dabf, 0xc010d1c900)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:586 +0xa6
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*BoltCreator).NewKeyValue(0xc011e4e120, 0xc011df3308, 0x8, 0x110, 0x110, 0xc010e9bfd8, 0x74af39)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/creator.go:40 +0x42
github.com/xyproto/algernon/lua/datastruct.newKeyValue(0xc0110886e0, 0x1223840, 0xc011e4e120, 0xc011df3308, 0x8, 0xf3a100, 0x403a69, 0xc010e9c0c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:28 +0x4f
github.com/xyproto/algernon/lua/datastruct.LoadKeyValue.func1(0xc0110886e0, 0xf1c040)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:147 +0xaf
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc0110886e0, 0x0, 0x7f4e1d25d601)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func26(0xc0110886e0, 0x7c000402, 0xc010d02000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:717 +0x394
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc0110886e0, 0xc010d02000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc0110886e0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc0110886e0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc0110886e0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc0121ea1e0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc0121ea1e0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25d6c0, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00bad2830, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc0110a05c0, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc0110a05c0, 0x1, 0x1, 0x1225d40, 0xc011671b00, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc010e9d4c8, 0xec0b40, 0xc011e295c0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc011671aa0, 0xc01247842b, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc010e9d4c8, 0xec0b40, 0xc011e295c0, 0x15, 0xc011671ad0, 0x1225cc0, 0xc011671aa0, 0xc0110a0400, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc010e9d4c8, 0xec0b40, 0xc011e295c0, 0x15, 0xc011671aa0, 0xec12c0, 0x1c1f5f8, 0x99, 0xc010e9d318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc010e9d4c8, 0xec0b40, 0xc011e295c0, 0x15, 0xc010a96240, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc010e9d4c8, 0xec0b40, 0xc011e295c0, 0x15, 0x1225bc0, 0xc011671b30)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc010e9d4c8, 0xec0b40, 0xc011e295c0, 0x15, 0x1225e00, 0xc0116714d0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc01158e540, 0x1213640, 0xc011738700, 0xec0b40, 0xc011e295c0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc01158e540, 0x1213640, 0xc011738700, 0xec0b40, 0xc011e295c0, 0xc01213b7a0, 0xc01213b7b0)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc011671110, 0x1213640, 0xc011738700, 0xec0b40, 0xc011e295c0, 0xc011f50001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011dea480, 0xc011e4c200, 0xc01205e570, 0x23, 0xc011f5c370, 0xb0, 0xb0, 0xc011e295c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011dea480, 0xc011e4c200, 0xc01205e570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011dea480, 0xc011e4c200, 0x7ffe0ceb862e, 0xf, 0xc012056060, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011e441c0, 0xc011e4c200)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011e441c0, 0xc011e4c200)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011e441c0, 0xc011e4c200)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011e441c0, 0xc011e4c200)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc011236e60, 0x12230c0, 0xc011dec140)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 92 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xc011db7301, 0xc011db6828, 0x8, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00ffb3f10, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.NewKeyValue(0xc00b4a0b40, 0xc011db6828, 0x8, 0x7f4e1d25d000, 0x0, 0x9178d396)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:586 +0xa6
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*BoltCreator).NewKeyValue(0xc011d341a0, 0xc011db6828, 0x8, 0x10, 0xf1c040, 0xc00ffb3fd8, 0x74af39)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/creator.go:40 +0x42
github.com/xyproto/algernon/lua/datastruct.newKeyValue(0xc011d98780, 0x1223840, 0xc011d341a0, 0xc011db6828, 0x8, 0x40dabf, 0x403a69, 0xc00ffb40c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:28 +0x4f
github.com/xyproto/algernon/lua/datastruct.LoadKeyValue.func1(0xc011d98780, 0xf1c040)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:147 +0xaf
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011d98780, 0x0, 0x7f4e1d25d001)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func26(0xc011d98780, 0x7c000402, 0xc0124ae000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:717 +0x394
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011d98780, 0xc0124ae000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011d98780, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011d98780, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011d98780, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011d961e0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011d961e0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d270c90, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a6cca40, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc012448a20, 0x2, 0x1, 0xfc6000, 0xc00005f840, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc012448a20, 0x1, 0x1, 0x1225d40, 0xc012452cf0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00ffb54c8, 0xec0b40, 0xc011d90b10, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc012452c90, 0xc0124781eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00ffb54c8, 0xec0b40, 0xc011d90b10, 0x15, 0xc012452cc0, 0x1225cc0, 0xc012452c90, 0xc012448900, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00ffb54c8, 0xec0b40, 0xc011d90b10, 0x15, 0xc012452c90, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00ffb5318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00ffb54c8, 0xec0b40, 0xc011d90b10, 0x15, 0xc011dc1ec0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00ffb54c8, 0xec0b40, 0xc011d90b10, 0x15, 0x1225bc0, 0xc012452d20)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00ffb54c8, 0xec0b40, 0xc011d90b10, 0x15, 0x1225e00, 0xc012452a80)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc01235bf00, 0x1213640, 0xc01241eb60, 0xec0b40, 0xc011d90b10, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc01235bf00, 0x1213640, 0xc01241eb60, 0xec0b40, 0xc011d90b10, 0xc011dc1440, 0xc011dc1450)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc012452750, 0x1213640, 0xc01241eb60, 0xec0b40, 0xc011d90b10, 0xc012440001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011dc62c0, 0xc011dce400, 0xc0120e31d0, 0x23, 0xc01244c160, 0xb0, 0xb0, 0xc011d90b10)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011dc62c0, 0xc011dce400, 0xc0120e31d0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011dc62c0, 0xc011dce400, 0x7ffe0ceb862e, 0xf, 0xc0120d0280, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0120da1c0, 0xc011dce400)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0120da1c0, 0xc011dce400)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0120da1c0, 0xc011dce400)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0120da1c0, 0xc011dce400)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00f9d86e0, 0x12230c0, 0xc0103a5580)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 309 [semacquire]:
sync.runtime_SemacquireMutex(0xc00018fa24, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/mutex.go:134 +0xff
sync.(*RWMutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/rwmutex.go:93 +0x2d
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap(0xc00057c000, 0x1221140, 0xc0123ce3c0, 0xc0122b9d00, 0xc01238ec00, 0x1b7, 0x3b7, 0xc011f20460, 0x20, 0x0, ...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:225 +0x5e
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc0123ce3c0, 0xc0122b9d00, 0xc011f38f00, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:196 +0x1555
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc0123ce3c0, 0xc0122b9d00, 0x7ffe0ceb862e, 0xf, 0xc011f203c0, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011f2c1c0, 0xc0122b9d00)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011f2c1c0, 0xc0122b9d00)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011f2c1c0, 0xc0122b9d00)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011f2c1c0, 0xc0122b9d00)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00fef7540, 0x12230c0, 0xc010f06900)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 264 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221950, 0x72, 0xc00a3e3e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc00efc3518, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc00efc3518, 0xc00f048400, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc00efc3500, 0xc00f048491, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc00efc3500, 0xc00f048491, 0x1, 0x1, 0xc001e63a98, 0xc00a3e3f68, 0x473315)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0012d7c28, 0xc00f048491, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00f048480)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 159 [runnable]:
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).NewClosure(0xc00f4dc5a0, 0x1092cc0, 0x0, 0x0, 0x0, 0xc00a426000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1233 +0x38c
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).SetFuncs(0xc00f4dc5a0, 0xc00fb09680, 0xc0000c1020, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/auxlib.go:302 +0x103
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.OpenChannel(0xc00f4dc5a0, 0x1)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/channellib.go:25 +0x17b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc00f4dc5a0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc00f4dc5a0, 0xc01027c000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:23 +0xfa
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc00f4dc5a0, 0x1, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc00f4dc5a0, 0x1, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).OpenLibs(0xc00f4dc5a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/linit.go:52 +0x215
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.NewState(0x0, 0x0, 0x0, 0xf5dbe0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1020 +0xec
github.com/xyproto/algernon/lua/pool.(*LStatePool).New(0xc0018cf320, 0x1226000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/pool/pool.go:26 +0x32
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:288 +0xb8
reflect.Value.call(0xe996c0, 0xc011d96780, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011d96780, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25d000, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a6d5750, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc0111cf780, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc0111cf780, 0x1, 0x1, 0x1225d40, 0xc00f893470, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00f8f74c8, 0xec0b40, 0xc01239d170, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc00f893410, 0xc011da642b, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00f8f74c8, 0xec0b40, 0xc01239d170, 0x15, 0xc00f893440, 0x1225cc0, 0xc00f893410, 0xc0111cf660, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00f8f74c8, 0xec0b40, 0xc01239d170, 0x15, 0xc00f893410, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00f8f7318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00f8f74c8, 0xec0b40, 0xc01239d170, 0x15, 0xc00fb08ea0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00f8f74c8, 0xec0b40, 0xc01239d170, 0x15, 0x1225bc0, 0xc00f8934a0)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00f8f74c8, 0xec0b40, 0xc01239d170, 0x15, 0x1225e00, 0xc00f893200)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc01020d840, 0x1213640, 0xc0117f27e0, 0xec0b40, 0xc01239d170, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc01020d840, 0x1213640, 0xc0117f27e0, 0xec0b40, 0xc01239d170, 0xc00fb08420, 0xc00fb08430)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc00f892ed0, 0x1213640, 0xc0117f27e0, 0xec0b40, 0xc01239d170, 0xc012440001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011dc6180, 0xc011dce200, 0xc0120e2ba0, 0x23, 0xc01244c370, 0xb0, 0xb0, 0xc01239d170)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011dc6180, 0xc011dce200, 0xc0120e2ba0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011dc6180, 0xc011dce200, 0x7ffe0ceb862e, 0xf, 0xc0120d0160, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0120da0e0, 0xc011dce200)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0120da0e0, 0xc011dce200)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0120da0e0, 0xc011dce200)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0120da0e0, 0xc011dce200)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00f7766e0, 0x12230c0, 0xc007ff9380)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 216 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221060, 0x72, 0xc00a393e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc010e1ff98, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc010e1ff98, 0xc0110e0600, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc010e1ff80, 0xc0110e0671, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc010e1ff80, 0xc0110e0671, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc010ab0610, 0xc0110e0671, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0110e0660)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 202 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc00f8f20a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc00f8f1fa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc0117eede0, 0xc011557b73, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc01178e0a0, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc01178e0a0, 0x1, 0xc0117c6700)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc01178e0a0, 0x80000003, 0xc0116cd000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc01178e0a0, 0xc0116cd000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc01178e0a0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc01178e0a0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc01178e0a0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc00fb39d60, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc00fb39d60, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25e440, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00ba37a20, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc01175ce00, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc01175ce00, 0x1, 0x1, 0x1225d40, 0xc01173baa0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc00f8f34c8, 0xec0b40, 0xc0116d58c0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc01173ba40, 0xc00a57362b, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc00f8f34c8, 0xec0b40, 0xc0116d58c0, 0x15, 0xc01173ba70, 0x1225cc0, 0xc01173ba40, 0xc01175cce0, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc00f8f34c8, 0xec0b40, 0xc0116d58c0, 0x15, 0xc01173ba40, 0xec12c0, 0x1c1f5f8, 0x99, 0xc00f8f3318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc00f8f34c8, 0xec0b40, 0xc0116d58c0, 0x15, 0xc011768ae0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc00f8f34c8, 0xec0b40, 0xc0116d58c0, 0x15, 0x1225bc0, 0xc01173bad0)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc00f8f34c8, 0xec0b40, 0xc0116d58c0, 0x15, 0x1225e00, 0xc01173b830)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc011725b40, 0x1213640, 0xc011739ab0, 0xec0b40, 0xc0116d58c0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc011725b40, 0x1213640, 0xc011739ab0, 0xec0b40, 0xc0116d58c0, 0xc011768060, 0xc011768070)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc01173b500, 0x1213640, 0xc011739ab0, 0xec0b40, 0xc0116d58c0, 0xc00a450001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc0117046a0, 0xc01170ec00, 0xc01145d4a0, 0x23, 0xc00a4573f0, 0xb0, 0xb0, 0xc0116d58c0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc0117046a0, 0xc01170ec00, 0xc01145d4a0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc0117046a0, 0xc01170ec00, 0x7ffe0ceb862e, 0xf, 0xc00f94b360, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00f6656c0, 0xc01170ec00)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00f6656c0, 0xc01170ec00)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00f6656c0, 0xc01170ec00)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00f6656c0, 0xc01170ec00)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00f7774a0, 0x12230c0, 0xc0052c7680)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 310 [runnable]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc0114de0a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc0114ddfa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc011dea020, 0xc010261653, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc00fab5400, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc00fab5400, 0x1, 0xc011523440)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc00fab5400, 0x80000003, 0xc010281000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc00fab5400, 0xc010281000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc00fab5400, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc00fab5400, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc00fab5400, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc00fb39270, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc00fb39270, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25e440, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc0081ec2e0, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc0114e06c0, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc0114e06c0, 0x1, 0x1, 0x1225d40, 0xc0114c5620, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc0114df4c8, 0xec0b40, 0xc0102fd440, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc0114c55c0, 0xc00a5731ab, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc0114df4c8, 0xec0b40, 0xc0102fd440, 0x15, 0xc0114c55f0, 0x1225cc0, 0xc0114c55c0, 0xc0114e05a0, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc0114df4c8, 0xec0b40, 0xc0102fd440, 0x15, 0xc0114c55c0, 0xec12c0, 0x1c1f5f8, 0x99, 0xc0114df318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc0114df4c8, 0xec0b40, 0xc0102fd440, 0x15, 0xc0114e26c0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc0114df4c8, 0xec0b40, 0xc0102fd440, 0x15, 0x1225bc0, 0xc0114c5650)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc0114df4c8, 0xec0b40, 0xc0102fd440, 0x15, 0x1225e00, 0xc0114c53b0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc0114ae7c0, 0x1213640, 0xc0114c0700, 0xec0b40, 0xc0102fd440, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc0114ae7c0, 0x1213640, 0xc0114c0700, 0xec0b40, 0xc0102fd440, 0xc0102b5c20, 0xc0102b5c30)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc0114c5080, 0x1213640, 0xc0114c0700, 0xec0b40, 0xc0102fd440, 0xc00a450001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc005643ea0, 0xc010f20400, 0xc01145c180, 0x23, 0xc00a456fd0, 0xb0, 0xb0, 0xc0102fd440)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc005643ea0, 0xc010f20400, 0xc01145c180, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc005643ea0, 0xc010f20400, 0x7ffe0ceb862e, 0xf, 0xc00f94ace0, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00f665340, 0xc010f20400)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00f665340, 0xc010f20400)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00f665340, 0xc010f20400)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00f665340, 0xc010f20400)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00fef75e0, 0x12230c0, 0xc010f06ac0)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 253 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc0106bc0a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc0106bbfa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc011f9e9e0, 0xc0115568e3, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc00fab5a40, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc00fab5a40, 0x1, 0xc0116e2d80)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc00fab5a40, 0x80000003, 0xc0116c8000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc00fab5a40, 0xc0116c8000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc00fab5a40, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc00fab5a40, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc00fab5a40, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc00fb39810, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc00fb39810, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25e440, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc008daeaf0, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc011692a60, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc011692a60, 0x1, 0x1, 0x1225d40, 0xc011671860, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc0106bd4c8, 0xec0b40, 0xc011517680, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc011671800, 0xc00a5733eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc0106bd4c8, 0xec0b40, 0xc011517680, 0x15, 0xc011671830, 0x1225cc0, 0xc011671800, 0xc011692940, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc0106bd4c8, 0xec0b40, 0xc011517680, 0x15, 0xc011671800, 0xec12c0, 0x1c1f5f8, 0x99, 0xc0106bd318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc0106bd4c8, 0xec0b40, 0xc011517680, 0x15, 0xc0116558c0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc0106bd4c8, 0xec0b40, 0xc011517680, 0x15, 0x1225bc0, 0xc011671890)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc0106bd4c8, 0xec0b40, 0xc011517680, 0x15, 0x1225e00, 0xc0116715f0)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc0116a6180, 0x1213640, 0xc0116840e0, 0xec0b40, 0xc011517680, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc0116a6180, 0x1213640, 0xc0116840e0, 0xec0b40, 0xc011517680, 0xc011654e40, 0xc011654e50)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc0116712c0, 0x1213640, 0xc0116840e0, 0xec0b40, 0xc011517680, 0xc00a450001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011550300, 0xc011548f00, 0xc01145cb10, 0x23, 0xc00a4571e0, 0xb0, 0xb0, 0xc011517680)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011550300, 0xc011548f00, 0xc01145cb10, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011550300, 0xc011548f00, 0x7ffe0ceb862e, 0xf, 0xc00f94b020, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00f665500, 0xc011548f00)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00f665500, 0xc011548f00)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00f665500, 0xc011548f00)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00f665500, 0xc011548f00)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc00f4ddae0, 0x12230c0, 0xc01061dac0)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 342 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221a20, 0x72, 0xc00ec50e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc008ca2198, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc008ca2198, 0xc00a342700, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc008ca2180, 0xc00a342761, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc008ca2180, 0xc00a342761, 0x1, 0x1, 0xc01061db58, 0xc00ec50f68, 0x473315)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0001f31e0, 0xc00a342761, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00a342750)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 354 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221610, 0x72, 0xc00ec52658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc00fc17998, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc00fc17998, 0xc00fca4b00, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc00fc17980, 0xc00fca4b21, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc00fc17980, 0xc00fca4b21, 0x1, 0x1, 0xc01168a100, 0xc011684410, 0x36)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00de33748, 0xc00fca4b21, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00fca4b10)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 109 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d2217b0, 0x72, 0xc00ec53e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc00f567898, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc00f567898, 0xc00f5d8f00, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc00f567880, 0xc00f5d8f71, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc00f567880, 0xc00f5d8f71, 0x1, 0x1, 0xc00361ad98, 0xc00ec53f68, 0x473315)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc001137788, 0xc00f5d8f71, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00f5d8f60)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 294 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc0106b80a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc0106b7fa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc0117ef7a0, 0xc011ab26d3, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc0110899a0, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc0110899a0, 0x1, 0xc011b5b880)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc0110899a0, 0x80000003, 0xc011981000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc0110899a0, 0xc011981000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc0110899a0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc0110899a0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc0110899a0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc01112f090, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc01112f090, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x9490a5, 0x948e63, 0x96845c)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a687230, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc011b0a820, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc011b0a820, 0x1, 0x1, 0x1225d40, 0xc011b209f0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc0106b94c8, 0xec0b40, 0xc011a1a810, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc011b20990, 0xc010343f2b, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc0106b94c8, 0xec0b40, 0xc011a1a810, 0x15, 0xc011b209c0, 0x1225cc0, 0xc011b20990, 0xc011b0a700, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc0106b94c8, 0xec0b40, 0xc011a1a810, 0x15, 0xc011b20990, 0xec12c0, 0x1c1f5f8, 0x99, 0xc0106b9318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc0106b94c8, 0xec0b40, 0xc011a1a810, 0x15, 0xc011b22540, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc0106b94c8, 0xec0b40, 0xc011a1a810, 0x15, 0x1225bc0, 0xc011b20a20)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc0106b94c8, 0xec0b40, 0xc011a1a810, 0x15, 0x1225e00, 0xc011b20780)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc011ac0d40, 0x1213640, 0xc011abd2d0, 0xec0b40, 0xc011a1a810, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc011ac0d40, 0x1213640, 0xc011abd2d0, 0xec0b40, 0xc011a1a810, 0xc011a15aa0, 0xc011a15ab0)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc011b20450, 0x1213640, 0xc011abd2d0, 0xec0b40, 0xc011a1a810, 0xc00eb10001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011a480c0, 0xc0119a1a00, 0xc0118eeb40, 0x23, 0xc00eb1dce0, 0xb0, 0xb0, 0xc011a1a810)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011a480c0, 0xc0119a1a00, 0xc0118eeb40, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011a480c0, 0xc0119a1a00, 0x7ffe0ceb862e, 0xf, 0xc011920240, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00eb6fea0, 0xc0119a1a00)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00eb6fea0, 0xc0119a1a00)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00eb6fea0, 0xc0119a1a00)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00eb6fea0, 0xc0119a1a00)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc01097c6e0, 0x12230c0, 0xc010a739c0)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 349 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221880, 0x72, 0xc0106a6658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc00eef7418, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc00eef7418, 0xc00ef55400, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc00eef7400, 0xc00ef554b1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc00eef7400, 0xc00ef554b1, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc001215b78, 0xc00ef554b1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00ef554a0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 336 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221af0, 0x72, 0xc0106a9658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc0081b0318, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc0081b0318, 0xc00eb02400, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc0081b0300, 0xc00eb02431, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc0081b0300, 0xc00eb02431, 0x1, 0x1, 0xc011100780, 0xc011122870, 0x36)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00000ef90, 0xc00eb02431, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00eb02420)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 373 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x1225100)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xf04301, 0xf1de80, 0x1227600, 0xc0114da0a0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc0114d9fa8, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*KeyValue).Inc(0xc0117ef3e0, 0xc011839443, 0x7, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:653 +0xab
github.com/xyproto/algernon/lua/datastruct.kvInc(0xc011089360, 0x2)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:77 +0x8b
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011089360, 0x1, 0xc0119a5f80)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func27(0xc011089360, 0x80000003, 0xc01197c000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:778 +0xf44
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011089360, 0xc01197c000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011089360, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011089360, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011089360, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc01112eaf0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc01112eaf0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d25eb00, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00bb65330, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc01195e480, 0x2, 0x1, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc01195e480, 0x1, 0x1, 0x1225d40, 0xc0119607b0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc0114db4c8, 0xec0b40, 0xc0118e65d0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc011960750, 0xc010343ceb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc0114db4c8, 0xec0b40, 0xc0118e65d0, 0x15, 0xc011960780, 0x1225cc0, 0xc011960750, 0xc01195e360, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc0114db4c8, 0xec0b40, 0xc0118e65d0, 0x15, 0xc011960750, 0xec12c0, 0x1c1f5f8, 0x99, 0xc0114db318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc0114db4c8, 0xec0b40, 0xc0118e65d0, 0x15, 0xc011913260, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc0114db4c8, 0xec0b40, 0xc0118e65d0, 0x15, 0x1225bc0, 0xc0119607e0)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc0114db4c8, 0xec0b40, 0xc0118e65d0, 0x15, 0x1225e00, 0xc011960540)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc0118f5280, 0x1213640, 0xc0119098f0, 0xec0b40, 0xc0118e65d0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc0118f5280, 0x1213640, 0xc0119098f0, 0xec0b40, 0xc0118e65d0, 0xc0119127e0, 0xc0119127f0)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc011960210, 0x1213640, 0xc0119098f0, 0xec0b40, 0xc0118e65d0, 0xc00eb10001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc01188fd20, 0xc0118add00, 0xc0118ee1b0, 0x23, 0xc00eb1dad0, 0xb0, 0xb0, 0xc0118e65d0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc01188fd20, 0xc0118add00, 0xc0118ee1b0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc01188fd20, 0xc0118add00, 0x7ffe0ceb862e, 0xf, 0xc010795f00, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc00eb6fce0, 0xc0118add00)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc00eb6fce0, 0xc0118add00)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc00eb6fce0, 0xc0118add00)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc00eb6fce0, 0xc0118add00)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc011088d20, 0x12230c0, 0xc0118bb900)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 374 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fdf80, 0x72, 0xc011866658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc01184b398, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc01184b398, 0xc0118e6200, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc01184b380, 0xc0118e62e1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc01184b380, 0xc0118e62e1, 0x1, 0x1, 0xc01184a200, 0xc01185a250, 0x36)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc010863118, 0xc0118e62e1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0118e62d0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 384 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221540, 0x72, 0xc011867e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc00f12b418, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc00f12b418, 0xc00f6feb00, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc00f12b400, 0xc00f6febe1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc00f12b400, 0xc00f6febe1, 0x1, 0x1, 0xc01198d780, 0xc011abd600, 0x36)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00000fe20, 0xc00f6febe1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00f6febd0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 347 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221200, 0x72, 0xc0106a4658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc010e1e418, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc010e1e418, 0xc010dd3900, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc010e1e400, 0xc010dd39f1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc010e1e400, 0xc010dd39f1, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc010ab03e8, 0xc010dd39f1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc010dd39e0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 350 [runnable]:
github.com/xyproto/algernon/vendor/github.com/yosssi/gcss.compileBytes(0xc01201a600, 0xbe, 0x600, 0xbe, 0x600)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yosssi/gcss/compile.go:84 +0xc7
github.com/xyproto/algernon/vendor/github.com/yosssi/gcss.Compile(0x1213640, 0xc000b73030, 0x1213620, 0xc000b72fc0, 0x7, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yosssi/gcss/compile.go:31 +0x82
github.com/xyproto/algernon/engine.ValidGCSS(0xc011d3c2c0, 0xbe, 0x2be, 0xc0123ae120)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:33 +0x94
created by github.com/xyproto/algernon/engine.(*Config).AmberPage
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:611 +0xe11

goroutine 418 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xc011d20b01, 0xc011e10778, 0x8, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc011fa5f10, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.NewKeyValue(0xc00b4a0b40, 0xc011e10778, 0x8, 0x7f4e1d25ff40, 0xc011d9c000, 0x7cf56ac1)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:586 +0xa6
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*BoltCreator).NewKeyValue(0xc011e4e028, 0xc011e10778, 0x8, 0x10, 0xf1c040, 0xc011fa5fd8, 0x74af39)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/creator.go:40 +0x42
github.com/xyproto/algernon/lua/datastruct.newKeyValue(0xc011f7c5a0, 0x1223840, 0xc011e4e028, 0xc011e10778, 0x8, 0x4215a8, 0xc00a69d120, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:28 +0x4f
github.com/xyproto/algernon/lua/datastruct.LoadKeyValue.func1(0xc011f7c5a0, 0xc012130050)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:147 +0xaf
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011f7c5a0, 0x0, 0xc011fa61d8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func26(0xc011f7c5a0, 0x7c000402, 0xc012130000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:717 +0x394
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011f7c5a0, 0xc012130000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011f7c5a0, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011f7c5a0, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011f7c5a0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011e241e0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011e241e0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d271a10, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a6b2a00, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc011f82760, 0x2, 0x1, 0xfc6000, 0xc000063d70, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc011f82760, 0x1, 0x1, 0x1225d40, 0xc0120024b0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc011fa74c8, 0xec0b40, 0xc011e0a2d0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc012002450, 0xc01200c1eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc011fa74c8, 0xec0b40, 0xc011e0a2d0, 0x15, 0xc012002480, 0x1225cc0, 0xc012002450, 0xc011f82640, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc011fa74c8, 0xec0b40, 0xc011e0a2d0, 0x15, 0xc012002450, 0xec12c0, 0x1c1f5f8, 0x99, 0xc011fa7318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc011fa74c8, 0xec0b40, 0xc011e0a2d0, 0x15, 0xc011e33c80, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc011fa74c8, 0xec0b40, 0xc011e0a2d0, 0x15, 0x1225bc0, 0xc0120024e0)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc011fa74c8, 0xec0b40, 0xc011e0a2d0, 0x15, 0x1225e00, 0xc012002240)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc011e63940, 0x1213640, 0xc011f029a0, 0xec0b40, 0xc011e0a2d0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc011e63940, 0x1213640, 0xc011f029a0, 0xec0b40, 0xc011e0a2d0, 0xc011e33200, 0xc011e33210)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc011e0bef0, 0x1213640, 0xc011f029a0, 0xec0b40, 0xc011e0a2d0, 0xc011f50001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011e2c000, 0xc011dce000, 0xc011e30570, 0x23, 0xc011f5c160, 0xb0, 0xb0, 0xc011e0a2d0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011e2c000, 0xc011dce000, 0xc011e30570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011e2c000, 0xc011dce000, 0x7ffe0ceb862e, 0xf, 0xc011e06060, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011e1c000, 0xc011dce000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011e1c000, 0xc011dce000)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011e1c000, 0xc011dce000)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011e1c000, 0xc011dce000)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc011d98000, 0x12230c0, 0xc011db8040)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 435 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fdeb0, 0x72, 0xc011da0e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc011d8e018, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc011d8e018, 0xc011d90000, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc011d8e000, 0xc011d900d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc011d8e000, 0xc011d900d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc011d94000, 0xc011d900d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc011d900c0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 450 [semacquire]:
sync.runtime_SemacquireMutex(0xc00b4a0cbc, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00b4a0cb8)
	/usr/local/go/src/sync/mutex.go:134 +0xff
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).beginRWTx(0xc00b4a0b40, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:512 +0x5e
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Begin(0xc00b4a0b40, 0xc011e93201, 0xc011e92798, 0x8, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:461 +0x38
github.com/xyproto/algernon/vendor/github.com/coreos/bbolt.(*DB).Update(0xc00b4a0b40, 0xc011fa1f10, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/coreos/bbolt/db.go:579 +0x3c
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.NewKeyValue(0xc00b4a0b40, 0xc011e92798, 0x8, 0x7f4e1d260600, 0xc011e88000, 0xc4cf47e9)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/simplebolt.go:586 +0xa6
github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt.(*BoltCreator).NewKeyValue(0xc011d94050, 0xc011e92798, 0x8, 0x10, 0xf1c040, 0xc011fa1fd8, 0x74af39)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/xyproto/simplebolt/creator.go:40 +0x42
github.com/xyproto/algernon/lua/datastruct.newKeyValue(0xc011e86640, 0x1223840, 0xc011d94050, 0xc011e92798, 0x8, 0x7f, 0x1c219b0, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:28 +0x4f
github.com/xyproto/algernon/lua/datastruct.LoadKeyValue.func1(0xc011e86640, 0xc012330050)
	/home/ubuntu/go/src/github.com/xyproto/algernon/lua/datastruct/keyvalue.go:147 +0xaf
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.callGFunction(0xc011e86640, 0x0, 0xc011fa21d8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:136 +0x40
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.init.3.func26(0xc011e86640, 0x7c000402, 0xc012330000, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:717 +0x394
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.mainLoop(0xc011e86640, 0xc012330000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/vm.go:31 +0xda
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).callR(0xc011e86640, 0x0, 0xffffffffffffffff, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:876 +0x247
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).Call(0xc011e86640, 0x0, 0xffffffffffffffff)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1613 +0x48
github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua.(*LState).PCall(0xc011e86640, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/vendor/github.com/yuin/gopher-lua/state.go:1676 +0xda
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap.func1.1(0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:303 +0x299
reflect.Value.call(0xe996c0, 0xc011e841e0, 0x13, 0xfcbef4, 0x4, 0x1c1f5f8, 0x1, 0x0, 0xfc6000, 0xecba01, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe996c0, 0xc011e841e0, 0x13, 0x1c1f5f8, 0x0, 0x0, 0x98, 0x7f4e1d260600, 0x124e640)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.call(0xea2f60, 0xc00a6b8ad0, 0x94, 0x1c1f5f8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/text/template/funcs.go:278 +0x3c0
reflect.Value.call(0xeba5c0, 0x1093fe8, 0x13, 0xfcbef4, 0x4, 0xc01215e760, 0x2, 0x1, 0xfc6000, 0xc000056280, ...)
	/usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xeba5c0, 0x1093fe8, 0x13, 0xc01215e760, 0x1, 0x1, 0x1225d40, 0xc01219a5d0, 0xfc6000)
	/usr/local/go/src/reflect/value.go:308 +0xa4
text/template.(*state).evalCall(0xc011fa34c8, 0xec0b40, 0xc011e803f0, 0x15, 0xeba5c0, 0x1093fe8, 0x13, 0x1225cc0, 0xc01219a570, 0xc0121a21eb, ...)
	/usr/local/go/src/text/template/exec.go:695 +0x6bd
text/template.(*state).evalFunction(0xc011fa34c8, 0xec0b40, 0xc011e803f0, 0x15, 0xc01219a5a0, 0x1225cc0, 0xc01219a570, 0xc01215e640, 0x2, 0x2, ...)
	/usr/local/go/src/text/template/exec.go:563 +0x172
text/template.(*state).evalCommand(0xc011fa34c8, 0xec0b40, 0xc011e803f0, 0x15, 0xc01219a570, 0xec12c0, 0x1c1f5f8, 0x99, 0xc011fa3318, 0x951ca7, ...)
	/usr/local/go/src/text/template/exec.go:460 +0x5e9
text/template.(*state).evalPipeline(0xc011fa34c8, 0xec0b40, 0xc011e803f0, 0x15, 0xc011e97ce0, 0x0, 0x0, 0x98)
	/usr/local/go/src/text/template/exec.go:429 +0x126
text/template.(*state).walk(0xc011fa34c8, 0xec0b40, 0xc011e803f0, 0x15, 0x1225bc0, 0xc01219a600)
	/usr/local/go/src/text/template/exec.go:254 +0x49b
text/template.(*state).walk(0xc011fa34c8, 0xec0b40, 0xc011e803f0, 0x15, 0x1225e00, 0xc01219a360)
	/usr/local/go/src/text/template/exec.go:262 +0x142
text/template.(*Template).execute(0xc012061ac0, 0x1213640, 0xc0120de9a0, 0xec0b40, 0xc011e803f0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:217 +0x215
text/template.(*Template).Execute(0xc012061ac0, 0x1213640, 0xc0120de9a0, 0xec0b40, 0xc011e803f0, 0xc011e97260, 0xc011e97270)
	/usr/local/go/src/text/template/exec.go:200 +0x53
html/template.(*Template).Execute(0xc01219a030, 0x1213640, 0xc0120de9a0, 0xec0b40, 0xc011e803f0, 0xc012150001, 0x0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011eae000, 0xc011e9a000, 0xc011eb0570, 0x23, 0xc012154160, 0xb0, 0xb0, 0xc011e803f0)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:635 +0x467
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011eae000, 0xc011e9a000, 0xc011eb0570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011eae000, 0xc011e9a000, 0x7ffe0ceb862e, 0xf, 0xc011e9c060, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011ea6000, 0xc011e9a000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011ea6000, 0xc011e9a000)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011ea6000, 0xc011e9a000)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011ea6000, 0xc011e9a000)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc011e86000, 0x12230c0, 0xc011e94040)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 452 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fdde0, 0x72, 0xc011e90e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc011e7e018, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc011e7e018, 0xc011e80000, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc011e7e000, 0xc011e800d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc011e7e000, 0xc011e800d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc011e82000, 0xc011e800d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc011e800c0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 483 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221bc0, 0x72, 0xc011f1ae58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc008cba218, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc008cba218, 0xc00a374300, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc008cba200, 0xc00a3743d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc008cba200, 0xc00a3743d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0012d6060, 0xc00a3743d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00a3743c0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 440 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fdb70, 0x72, 0xc011da1e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc011d8e218, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc011d8e218, 0xc011d90800, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc011d8e200, 0xc011d90821, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc011d8e200, 0xc011d90821, 0x1, 0x1, 0xc011e08900, 0xc011f02cd0, 0x36)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc011d94038, 0xc011d90821, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc011d90810)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 422 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d2216e0, 0x72, 0xc011f1b658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc00f888418, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc00f888418, 0xc00f892300, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc00f888400, 0xc00f892371, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc00f888400, 0xc00f892371, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00de32b18, 0xc00f892371, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00f892360)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 488 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221130, 0x72, 0xc011f1be58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc010e1ff18, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc010e1ff18, 0xc0110e0000, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc010e1ff00, 0xc0110e00d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc010e1ff00, 0xc0110e00d1, 0x1, 0x1, 0xc011f22900, 0xc012000cd0, 0x36)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc010ab05f0, 0xc0110e00d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0110e00c0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 489 [semacquire]:
sync.runtime_SemacquireMutex(0xc00018fa24, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/mutex.go:134 +0xff
sync.(*RWMutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/rwmutex.go:93 +0x2d
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap(0xc00057c000, 0x1221140, 0xc0124c23a0, 0xc0122b9e00, 0xc012075c00, 0x1b7, 0x3b7, 0xc0123a8220, 0x20, 0x0, ...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:225 +0x5e
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc0124c23a0, 0xc0122b9e00, 0xc011eb0f00, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:196 +0x1555
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc0124c23a0, 0xc0122b9e00, 0x7ffe0ceb862e, 0xf, 0xc011e9c380, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011f2c2a0, 0xc0122b9e00)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011f2c2a0, 0xc0122b9e00)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011f2c2a0, 0xc0122b9e00)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011f2c2a0, 0xc0122b9e00)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc012042640, 0x12230c0, 0xc0122dbb40)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 421 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fdc40, 0x72, 0xc011862658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc011d8e098, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc011d8e098, 0xc011d90100, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc011d8e080, 0xc011d901f1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc011d8e080, 0xc011d901f1, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc011d94010, 0xc011d901f1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc011d901e0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 424 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221470, 0x72, 0xc011e91658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc010382e98, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc010382e98, 0xc010347e00, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc010382e80, 0xc010347e41, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc010382e80, 0xc010347e41, 0x1, 0x1, 0x4, 0x7, 0x113)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00543c9c8, 0xc010347e41, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc010347e30)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 457 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fd830, 0x72, 0xc011e91e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc011f23b18, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc011f23b18, 0xc0123d0500, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc011f23b00, 0xc0123d05b1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc011f23b00, 0xc0123d05b1, 0x1, 0x1, 0xc011e7e980, 0xc0120decd0, 0x36)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc011f10208, 0xc0123d05b1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0123d05a0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 458 [runnable]:
net/http.(*connReader).backgroundRead(0xc00a442090)
	/usr/local/go/src/net/http/server.go:675
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 423 [chan receive]:
github.com/xyproto/algernon/engine.(*Config).AmberPage(0xc00057c000, 0x1221140, 0xc011f83360, 0xc011dce300, 0xc011e30f00, 0x23, 0xc011e36280, 0x71, 0x271, 0xc0112dae10)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/rendering.go:612 +0xe3a
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011f83360, 0xc011dce300, 0xc011e30f00, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:223 +0x14c6
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011f83360, 0xc011dce300, 0x7ffe0ceb862e, 0xf, 0xc011e06340, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc011e1c1c0, 0xc011dce300)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc011e1c1c0, 0xc011dce300)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc011e1c1c0, 0xc011dce300)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc011e1c1c0, 0xc011dce300)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc011d98140, 0x12230c0, 0xc011db8480)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 498 [semacquire]:
sync.runtime_SemacquireMutex(0xc00018fa24, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/mutex.go:134 +0xff
sync.(*RWMutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/rwmutex.go:93 +0x2d
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap(0xc00057c000, 0x1221140, 0xc011d136c0, 0xc01220e000, 0xc011d2dc00, 0x1b7, 0x3b7, 0xc011d261e0, 0x20, 0x0, ...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:225 +0x5e
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc011d136c0, 0xc01220e000, 0xc012302570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:196 +0x1555
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc011d136c0, 0xc01220e000, 0x7ffe0ceb862e, 0xf, 0xc011d26140, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0122fc000, 0xc01220e000)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0122fc000, 0xc01220e000)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0122fc000, 0xc01220e000)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0122fc000, 0xc01220e000)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc0121ec000, 0x12230c0, 0xc0121fe040)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 515 [IO wait]:
internal/poll.runtime_pollWait(0x7f4e1d221d60, 0x72, 0xc012208e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc008cba098, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc008cba098, 0xc00a374200, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc008cba080, 0xc00a3742b1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc008cba080, 0xc00a3742b1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0012d6048, 0xc00a3742b1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc00a3742a0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 531 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fdaa0, 0x72, 0xc012204e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc0121e0018, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc0121e0018, 0xc0121e4000, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc0121e0000, 0xc0121e40d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc0121e0000, 0xc0121e40d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0121e6000, 0xc0121e40d1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0121e40c0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 500 [semacquire]:
sync.runtime_SemacquireMutex(0xc00018fa24, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/mutex.go:134 +0xff
sync.(*RWMutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/rwmutex.go:93 +0x2d
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap(0xc00057c000, 0x1221140, 0xc0123b8000, 0xc01220e100, 0xc0123ca000, 0x1b7, 0x3b7, 0xc0123a8100, 0x20, 0x0, ...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:225 +0x5e
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc0123b8000, 0xc01220e100, 0xc0123ba570, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:196 +0x1555
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc0123b8000, 0xc01220e100, 0x7ffe0ceb862e, 0xf, 0xc0123a8060, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0123b4000, 0xc01220e100)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0123b4000, 0xc01220e100)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0123b4000, 0xc01220e100)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0123b4000, 0xc01220e100)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc0121ec0a0, 0x12230c0, 0xc0121fe240)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 501 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fd9d0, 0x72, 0xc011f16e58)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc0121e0098, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc0121e0098, 0xc0121e4100, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc0121e0080, 0xc0121e41c1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc0121e0080, 0xc0121e41c1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0121e6010, 0xc0121e41c1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0121e41b0)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2

goroutine 502 [semacquire]:
sync.runtime_SemacquireMutex(0xc00018fa24, 0x0)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/mutex.go:134 +0xff
sync.(*RWMutex).Lock(0xc00018fa20)
	/usr/local/go/src/sync/rwmutex.go:93 +0x2d
github.com/xyproto/algernon/engine.(*Config).LuaFunctionMap(0xc00057c000, 0x1221140, 0xc0123b8160, 0xc01220e200, 0xc0123ca400, 0x1b7, 0x3b7, 0xc0123a8200, 0x20, 0x0, ...)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/lua.go:225 +0x5e
github.com/xyproto/algernon/engine.(*Config).FilePage(0xc00057c000, 0x1221140, 0xc0123b8160, 0xc01220e200, 0xc0123baba0, 0x23, 0xfdae88, 0x8)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:196 +0x1555
github.com/xyproto/algernon/engine.(*Config).DirPage(0xc00057c000, 0x1221140, 0xc0123b8160, 0xc01220e200, 0x7ffe0ceb862e, 0xf, 0xc0123a8160, 0x18, 0xfd69eb, 0x7)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/dirhandler.go:139 +0x2b8
github.com/xyproto/algernon/engine.(*Config).RegisterHandlers.func1(0x1222300, 0xc0123b40e0, 0xc01220e200)
	/home/ubuntu/go/src/github.com/xyproto/algernon/engine/handlers.go:484 +0x49e
net/http.HandlerFunc.ServeHTTP(0xc000530dc0, 0x1222300, 0xc0123b40e0, 0xc01220e200)
	/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00a2c2510, 0x1222300, 0xc0123b40e0, 0xc01220e200)
	/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00a344f70, 0x1222300, 0xc0123b40e0, 0xc01220e200)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc0121ec140, 0x12230c0, 0xc0121fe3c0)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

goroutine 503 [IO wait]:
internal/poll.runtime_pollWait(0x7f4de01fd900, 0x72, 0xc011f17658)
	/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc0121e0198, 0x72, 0xffffffffffffff00, 0x1216940, 0x19dc968)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc0121e0198, 0xc0121e4500, 0x1, 0x1)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc0121e0180, 0xc0121e4581, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc0121e0180, 0xc0121e4581, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0121e6028, 0xc0121e4581, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:177 +0x68
net/http.(*connReader).backgroundRead(0xc0121e4570)
	/usr/local/go/src/net/http/server.go:676 +0x5a
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:672 +0xd2
Time: 0h:00m:20s

race condition in gopher-lua: fatal error: concurrent map writes

it seems like maybe the lua function "handle" is missing locking, or doesn't use a seperate lua instance from the state cache.

time="2016-10-01T09:03:34Z" level=info msg="Serving HTTP/2 on :443" 
time="2016-10-01T09:03:34Z" level=info msg="Serving HTTP on :80" 
time="2016-10-01T09:03:34Z" level=error msg="open /etc/algernon/cert.pem: no such file or directory" 
fatal error: concurrent map writes

goroutine 20 [running]:
runtime.throw(0x557a43505e40, 0x15)
    /usr/lib/go/src/runtime/panic.go:547 +0x90 fp=0xc8203fb398 sp=0xc8203fb380
runtime.mapassign1(0x557a432474c0, 0xc820159170, 0xc8203fb5f0, 0xc8203fb5e0)
    /usr/lib/go/src/runtime/hashmap.go:445 +0xb1 fp=0xc8203fb440 sp=0xc8203fb398
github.com/yuin/gopher-lua.(*LState).setFieldString(0xc820077580, 0x7f83a8b460f8, 0xc82005b3e0, 0x557a43482ad0, 0x5, 0x7f83a8b46068, 0xc820406e40)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/yuin/gopher-lua/state.go:980 +0xb0e fp=0xc8203fb648 sp=0xc8203fb440
github.com/yuin/gopher-lua.(*LState).SetField(0xc820077580, 0x7f83a8b460f8, 0xc82005b3e0, 0x557a43482ad0, 0x5, 0x7f83a8b46068, 0xc820406e40)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/yuin/gopher-lua/state.go:1504 +0x5d fp=0xc8203fb688 sp=0xc8203fb648
github.com/yuin/gopher-lua.(*LState).SetGlobal(0xc820077580, 0x557a43482ad0, 0x5, 0x7f83a8b46068, 0xc820406e40)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/yuin/gopher-lua/state.go:1520 +0x7e fp=0xc8203fb6d8 sp=0xc8203fb688
main.exportBasicWeb(0x7f83a8b48260, 0xc82019add0, 0xc82042c700, 0xc820077580, 0x7ffc3001a24b, 0x1c, 0x0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/basic.go:129 +0x370 fp=0xc8203fb908 sp=0xc8203fb6d8
main.exportCommonFunctions(0x7f83a8b48260, 0xc82019add0, 0xc82042c700, 0x7ffc3001a24b, 0x1c, 0x7f83a8b41dd0, 0xc82005b2c0, 0xc820077580, 0xc8201c3b00, 0x0, ...)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/lua.go:247 +0x73 fp=0xc8203fb980 sp=0xc8203fb908
main.exportLuaHandlerFunctions.func1.1(0x7f83a8b48260, 0xc82019add0, 0xc82042c700)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/luahandler.go:23 +0xe4 fp=0xc8203fbae8 sp=0xc8203fb980
net/http.HandlerFunc.ServeHTTP(0xc820325380, 0x7f83a8b48260, 0xc82019add0, 0xc82042c700)
    /usr/lib/go/src/net/http/server.go:1618 +0x3a fp=0xc8203fbb08 sp=0xc8203fbae8
net/http.(*ServeMux).ServeHTTP(0xc820158bd0, 0x7f83a8b48260, 0xc82019add0, 0xc82042c700)
    /usr/lib/go/src/net/http/server.go:1910 +0x17d fp=0xc8203fbb60 sp=0xc8203fbb08
net/http.serverHandler.ServeHTTP(0xc82036c180, 0x7f83a8b48260, 0xc82019add0, 0xc82042c700)
    /usr/lib/go/src/net/http/server.go:2081 +0x19e fp=0xc8203fbbc0 sp=0xc8203fbb60
net/http.(*conn).serve(0xc82036cd80)
    /usr/lib/go/src/net/http/server.go:1472 +0xf2e fp=0xc8203fbf88 sp=0xc8203fbbc0
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8203fbf90 sp=0xc8203fbf88
created by net/http.(*Server).Serve
    /usr/lib/go/src/net/http/server.go:2137 +0x44e

goroutine 1 [chan send]:
main.serve(0xc820357960, 0xc820158bd0, 0xc820325440, 0xc8203253e0, 0x0, 0x0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/serve.go:184 +0x424
main.main()
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/main.go:354 +0x2df7

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:1998 +0x1

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
    /usr/lib/go/src/runtime/sigqueue.go:116 +0x132
os/signal.loop()
    /usr/lib/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
    /usr/lib/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 6 [chan receive]:
github.com/bobappleyard/readline.handleSignals()
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/bobappleyard/readline/readline.go:301 +0x176
created by github.com/bobappleyard/readline.init.1
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/bobappleyard/readline/readline.go:314 +0x4a

goroutine 8 [chan receive]:
main.serve.func1(0xc8203254a0, 0xc820357960, 0xc820158bd0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/serve.go:121 +0x45
created by main.serve
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/serve.go:129 +0x101

goroutine 18 [select, locked to thread]:
runtime.gopark(0x557a435de028, 0xc82001e728, 0x557a43486180, 0x6, 0x18, 0x2)
    /usr/lib/go/src/runtime/proc.go:262 +0x163
runtime.selectgoImpl(0xc82001e728, 0x0, 0x18)
    /usr/lib/go/src/runtime/select.go:392 +0xa67
runtime.selectgo(0xc82001e728)
    /usr/lib/go/src/runtime/select.go:215 +0x12
runtime.ensureSigM.func1()
    /usr/lib/go/src/runtime/signal1_unix.go:279 +0x358
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:1998 +0x1

goroutine 10 [IO wait]:
net.runtime_pollWait(0x7f83a8b48048, 0x72, 0x0)
    /usr/lib/go/src/runtime/netpoll.go:160 +0x60
net.(*pollDesc).Wait(0xc820357bf0, 0x72, 0x0, 0x0)
    /usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc820357bf0, 0x0, 0x0)
    /usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).accept(0xc820357b90, 0x0, 0x7f83a8b48108, 0xc8203270e0)
    /usr/lib/go/src/net/fd_unix.go:426 +0x27c
net.(*TCPListener).AcceptTCP(0xc820026300, 0xc820037cd0, 0x0, 0x0)
    /usr/lib/go/src/net/tcpsock_posix.go:254 +0x4d
net.(*TCPListener).Accept(0xc820026300, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go/src/net/tcpsock_posix.go:264 +0x3d
net/http.(*Server).Serve(0xc82036c180, 0x7f83a8b470c8, 0xc820026300, 0x0, 0x0)
    /usr/lib/go/src/net/http/server.go:2117 +0x129
github.com/tylerb/graceful.(*Server).Serve(0xc82036c200, 0x7f83a8b470c8, 0xc820026300, 0x0, 0x0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/tylerb/graceful/graceful.go:256 +0x53f
github.com/tylerb/graceful.(*Server).ListenAndServe(0xc82036c200, 0x0, 0x0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/tylerb/graceful/graceful.go:135 +0xdf
main.serve.func3(0xc820158bd0, 0xc820357960)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/serve.go:148 +0xa6
created by main.serve
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/serve.go:152 +0x3eb

goroutine 12 [select]:
github.com/tylerb/graceful.(*Server).manageConnections(0xc82036c200, 0xc820325560, 0xc8203255c0, 0xc820325620, 0xc820325680)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/tylerb/graceful/graceful.go:313 +0x4fb
created by github.com/tylerb/graceful.(*Server).Serve
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/tylerb/graceful/graceful.go:244 +0x2db

goroutine 13 [chan receive]:
github.com/tylerb/graceful.(*Server).handleInterrupt(0xc82036c200, 0xc8203256e0, 0xc820325740, 0x7f83a8b470c8, 0xc820026300)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/tylerb/graceful/graceful.go:350 +0x64
created by github.com/tylerb/graceful.(*Server).Serve
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/tylerb/graceful/graceful.go:252 +0x511

goroutine 37 [IO wait]:
net.runtime_pollWait(0x7f83a8b47e08, 0x72, 0xc820367000)
    /usr/lib/go/src/runtime/netpoll.go:160 +0x60
net.(*pollDesc).Wait(0xc8204a2680, 0x72, 0x0, 0x0)
    /usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8204a2680, 0x0, 0x0)
    /usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8204a2620, 0xc820367000, 0x1000, 0x1000, 0x0, 0x7f83a8b39050, 0xc820018140)
    /usr/lib/go/src/net/fd_unix.go:250 +0x23a
net.(*conn).Read(0xc8203ee138, 0xc820367000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/lib/go/src/net/net.go:172 +0xe4
net/http.(*connReader).Read(0xc820423e00, 0xc820367000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/lib/go/src/net/http/server.go:526 +0x196
bufio.(*Reader).fill(0xc8203257a0)
    /usr/lib/go/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).ReadSlice(0xc8203257a0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go/src/bufio/bufio.go:328 +0x21a
bufio.(*Reader).ReadLine(0xc8203257a0, 0x0, 0x0, 0x0, 0x557a43449c00, 0x0, 0x0)
    /usr/lib/go/src/bufio/bufio.go:357 +0x53
net/textproto.(*Reader).readLineSlice(0xc82017dfb0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go/src/net/textproto/reader.go:55 +0x81
net/textproto.(*Reader).ReadLine(0xc82017dfb0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go/src/net/textproto/reader.go:36 +0x40
net/http.readRequest(0xc8203257a0, 0x557a435dda00, 0xc82042c460, 0x0, 0x0)
    /usr/lib/go/src/net/http/request.go:721 +0xb6
net/http.(*conn).readRequest(0xc820391300, 0x0, 0x0, 0x0)
    /usr/lib/go/src/net/http/server.go:705 +0x359
net/http.(*conn).serve(0xc820391300)
    /usr/lib/go/src/net/http/server.go:1425 +0x947
created by net/http.(*Server).Serve
    /usr/lib/go/src/net/http/server.go:2137 +0x44e

goroutine 19 [runnable]:
github.com/yuin/gopher-lua.(*LState).setFieldString(0xc820077580, 0x7f83a8b460f8, 0xc82005b3e0, 0x557a434864a0, 0x5, 0x7f83a8b46068, 0xc82017a8c0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/yuin/gopher-lua/state.go:980 +0xb0e
github.com/yuin/gopher-lua.(*LState).SetField(0xc820077580, 0x7f83a8b460f8, 0xc82005b3e0, 0x557a434864a0, 0x5, 0x7f83a8b46068, 0xc82017a8c0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/yuin/gopher-lua/state.go:1504 +0x5d
github.com/yuin/gopher-lua.(*LState).SetGlobal(0xc820077580, 0x557a434864a0, 0x5, 0x7f83a8b46068, 0xc82017a8c0)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/yuin/gopher-lua/state.go:1520 +0x7e
main.exportBasicSystemFunctions(0xc820077580)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/basic.go:59 +0x6b3
main.exportCommonFunctions(0x7f83a8b48260, 0xc8200d2340, 0xc82042c540, 0x7ffc3001a24b, 0x1c, 0x7f83a8b41dd0, 0xc82005b2c0, 0xc820077580, 0xc8201c3b00, 0x0, ...)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/lua.go:250 +0x84
main.exportLuaHandlerFunctions.func1.1(0x7f83a8b48260, 0xc8200d2340, 0xc82042c540)
    /var/tmp/portage/www-servers/algernon-1.0/work/algernon-1.0/src/github.com/xyproto/algernon/luahandler.go:23 +0xe4
net/http.HandlerFunc.ServeHTTP(0xc820325380, 0x7f83a8b48260, 0xc8200d2340, 0xc82042c540)
    /usr/lib/go/src/net/http/server.go:1618 +0x3a
net/http.(*ServeMux).ServeHTTP(0xc820158bd0, 0x7f83a8b48260, 0xc8200d2340, 0xc82042c540)
    /usr/lib/go/src/net/http/server.go:1910 +0x17d
net/http.serverHandler.ServeHTTP(0xc82036c180, 0x7f83a8b48260, 0xc8200d2340, 0xc82042c540)
    /usr/lib/go/src/net/http/server.go:2081 +0x19e
net/http.(*conn).serve(0xc820076100)
    /usr/lib/go/src/net/http/server.go:1472 +0xf2e
created by net/http.(*Server).Serve
    /usr/lib/go/src/net/http/server.go:2137 +0x44e

Bolt Cursor or redis keys?

Is there any mechanism to scan the database key space in lua? ie. the equivalent of a Bolt Cursor or "keys *" in redis? I'm also looking at redis pub/sub as something it'd be nice to post to but is missing from the built-in api.

If there was some sort of api passthru maybe that'd work. Dunno.

PS. We need to find a better way to socialize this awesome bit of code. I've been looking for it (or something like it - a standalone go-based lua app server) for months.

Sample use of .zip/.alg

The readme references the ability to use .zip or .alg files, presumably to bundle your website content. Would it be possible to add a sample to the samples/ folder that utilizes this feature? Thanks!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.