4591: Websockets server fetches fewer logs at a time.
authorBrett Smith <brett@curoverse.com>
Tue, 2 Dec 2014 15:23:21 +0000 (10:23 -0500)
committerBrett Smith <brett@curoverse.com>
Tue, 2 Dec 2014 15:57:56 +0000 (10:57 -0500)
commitd7f8e442bb91243484c75e2e1278293f0a476068
treea1dd6264831889c4388f07df109353a4ef2ea663
parent3bbde3e33fea2fadd0b86abef35bdaa4400d9883
4591: Websockets server fetches fewer logs at a time.

Most of the out of memory errors we're seeing happen in the PostgreSQL
driver, which runs out of space to store results.  Because Log records
are relatively large (holding two other records as JSON text),
fetching fewer in a batch should noticeably improve memory use.  I
don't expect this to end the crashing, though—it seems like the
Websockets server grows large for a variety of reasons.  Hopefully
this change will help make some of the others clearer.
services/api/lib/eventbus.rb