Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Aug 16, 2013
  1. @ferd

    log-token inspection function

    ferd authored
    This escript allows to fetch app ids (for now) based on a given log
    token, assuming access to the local host.
Commits on Aug 9, 2013
  1. @ferd

    Fixing deps and adding recon

    ferd authored
    Mochiweb branches were broken for public and test rebar config. This
    comes from the migration from the mochi account to the internal heroku
    account. New branches were created but the account name wasn't switched.
    Recon is a library to help with devops tasks in production.
Commits on Aug 8, 2013
  1. @ferd

    configuring lager watermarks

    ferd authored
  2. @ferd
  3. @ferd

    Moving to a sys.config configuration

    ferd authored
    Rather than configuring specific apps in many places (bin/logplex,
    bin/devel_logplex, logplex_app.erl), configurations are moved to a
    sys.config file that can be loaded by adding `-config sys` to the `erl`
    exectuable, or loaded automatically when generating an OTP release.
  4. @ferd

    Moving logging to lager

    ferd authored
    The current logplex version shows a point of contention for logs through
    using io:format/2. Although it is unlikely lager will help a lot with
    it given we don't log directly to disk (and this is where it shines in
    comparison to other logging engines), it's worth trying to see if things
    are improving with it.
    Custom log formats are used to make sure the production log format
    remains 100% identical to the former one. They will, however, be
    different during test runs because no specific care has been taken to
    make the lager config be compatible in test cases.
  5. @ferd

    Adding hibernation timeouts on drains

    ferd authored
    An inactive drain or buffer (Receives no request from the outside world)
    should be sent to hibernation in order to trigger a full-sweep GC,
    compact the memory of the process, and reduce the overall load of the
    system, and possibly reducing memory fragmentation of the VM at the cost
    of slightly more CPU when it triggers.
    The timeout is implemented using the gen_fsm timeout option, which
    automatically resets timeout timers when a message is processed by the
    process. This should allow to generally catch any kind of inactivity and
    force hibernation of the processes.
    Note: it is not yet known if the timeout value of 5 seconds or the
    amount of timers setup/cancellations will have an impact of any
    significance on an active system or not. The values may need to be
    tweaked or the effort redirected towards manual GC if refc binaries keep
    on hogging the memory after this.
Commits on Aug 7, 2013
  1. @ferd

    Making counters explicit for buffer size

    ferd authored
    The logplex_msg_buffer module is used extensively by drain processes
    that buffer request and need to be the least blocking possible under
    heavy load. The current implementation would recalculate the entire
    queue length on every call, which became both time consuming and CPU
    intensive when the buffer was full, which happens when you have to count
    lengths even more often.
    This patch makes it so that we have an explicit counter for the buffer
    so that we don't need to recalculate it all the time, lowering the
    contention for runtime for a given process.
    The module includes conversion clauses for all functions part of the API
    so that the code can be hot-reloaded without stopping, and just adapt to
    the new format.
  2. @ferd

    Force hibernation on drain reconnect

    ferd authored
    When there's a timer being set for a reconnection, we force hibernation
    in order to do a fullsweep GC of the drain processes.
    This might incur a certain cost for very busy-but-disconnected
    processes, forcing a short pause, but the backoff timers for
    reconnections will act as rate limiters on this.
Commits on Aug 6, 2013
  1. @ferd

    Support more transition versions

    ferd authored
    R16B01 and R16B01-swfi are forks of v69 that were supported for
    a while and need to be able to upgrade too.
  2. @ferd
  3. @ferd

    Move web responses before IO logging calls

    ferd authored
    With IO being blocking for individual processes due to Erlang's IO
    protocol and logplex using io:format/2 to log information, it is
    possible that a node that does a lot of logging has bad tail latencies
    on its API as reported by issues #49 and #51 on github.
    This quickfix, pending a rewrite of the logging system to be
    non-blocking and load-shedding, moves the logging outside of the
    critical path for part of the requests as a whole. Some requests, such
    as token creation for channels (POST /v2/channels/(\\d+)/tokens) still
    contain logs in said critical path and will only see minor improvements.
  4. @ferd

    Update invalid log message for rfc5424

    ferd authored
    The HTTP API used to not accept the STRUCTURED-DATA field of logplex
    messages, but this is no longer true as of May 2013. The documentation
    (last edited before then) didn't reflect the change.
Commits on Jul 19, 2013
  1. @ferd
  2. @ferd

    Merge pull request #48 from heroku/refc-leak-quickfix

    ferd authored
    Quickfix for logplex refc binary leak
  3. @ferd

    Quickfix for logplex refc binary leak

    ferd authored
    This fix is temporary. It garbage collects the node once it
    reaches too high of a memory threshold in an attempt to protect
    against failure due to OOMs following refc binaries leak.
Commits on Jul 16, 2013
  1. @ferd

    Bump to R16B01

    ferd authored
Commits on Jun 28, 2013
  1. @ferd

    Getting chunked encoding working

    ferd authored
Commits on Jun 27, 2013
  1. @ferd

    Moving from crypto:md5/1 -> crypto:hash/2

    ferd authored
    crypto:md5(Data) is getting deprecated in favour of
    crypto:hash(md5,Data) in R16B02, and R16B01 will be generating warnings
    for it.
    This is preemptively future-proofing the code so we can keep using
    warning-as-errors settings.
Commits on Jun 26, 2013
  1. @ferd

    Merge branch 'v68'

    ferd authored
Commits on Jun 25, 2013
  1. @ferd

    Adding redgrid management escript

    ferd authored
    The escript allows to do a few operations on redgrid:
    - get the redgrid process status
    - get a list of connected nodes according to redgrid
    - suspend redgrid (and unregister from it)
    - resume redgrid (and connect to it)
    The script connects as a hidden node.
Commits on Jun 18, 2013
  1. @ferd

    fixing test dependencies

    ferd authored
    fix suite argument order also
  2. @ferd
  3. @ferd
  4. @ferd

    Updating rebar to newer version

    ferd authored
  5. @ferd

    Allowing write concurrency on logplex_stats

    ferd authored
    Logplex_stats is a table that receives a very large amount of writes for
    one big read every minute. We should be able to generally benefit by
    reducing contention on resources given pretty much all drains write to
    that table, at the cost of a slightly longer blocking time when reading.
  6. @ferd

    Partial support for cowboy 0.8.5

    ferd authored
    Also upgrades the header on bad responses to contain the explanation
    instead of the generic HTTP message
  7. @ferd

    Requiring R16B

    ferd authored
  8. @ferd

    Adding a way to unregister a channel

    ferd authored
    Tests are included. The feature will be required when upgrading
    tcpsyslog drains from one kind to another -- the drain process itself
    will need to transfer the channel property to the drain buffer process,
    otherwise messages will be duplicated.
  9. @ferd

    Fixing bad shutdown in end_testcase

    ferd authored
    The end per testcase function is common to multiple tests, but some of
    them do not use an active drain. This fix makes the end_per_testcase
    function blind to whether it exists or not.
  10. @ferd

    Remove stale code from http drains

    ferd authored
    Had to do with runtime compatibility in older versions, no longer
  11. @ferd

    extend logplex_drain_buffer API

    ferd authored
    allow to resize the buffer dynamically, which would be useful to support
    an API similar to the tcpsyslog one.
  12. @ferd

    Bad shutdown fix

    ferd authored
    Part of tcpsyslog drains (when connected) were sensitive to a previous
    race condition on shutdown
  13. @ferd

    Basic test suite for TCP drains

    ferd authored
    The send behaviour is documented, along with basic L10'ing.
    There is otherwise not a need for tests as advanced as for the http
    drain buffers given there is not a lot of similar error handling code
    included. (TCP drains just ignore all send errors and keep going)
  14. @ferd

    Merge branch 'v67.1'

    ferd authored
Something went wrong with that request. Please try again.