             #    dbg("error: #{misc.to_json(err)}")
             opts.cb(err, result)
         )
+
+    # Stress testing
+    stress1: (opts) =>
+        opts = defaults opts,
+            account_id : required
+            cb         : undefined
+        collaborators = undefined
+        changefeeds = []
+        dbg = (m) => winston.debug("stress1(#{opts.account_id}): #{m}")
+        async.series([
+            (cb) =>
+                dbg("get collabs")
+                t = misc.mswalltime()
+                @user_query
+                    account_id : opts.account_id
+                    query      : {collaborators:[{account_id:null, first_name:null, last_name:null}]}
+                    cb         : (err, x) =>
+                        collaborators = x?.collaborators
+                        dbg("got #{collaborators?.length}, time=#{misc.mswalltime(t)}")
+                        cb(err)
+            (cb) =>
+                t = misc.mswalltime()
+                n = 0
+                f = (user, cb) =>
+                    id = misc.uuid()
+                    changefeeds.push(id)
+                    @user_query
+                        account_id : user.account_id
+                        query      : {collaborators:[{first_name:null,last_name:null,last_active:null,account_id:null}]}
+                        changes    : id
+                        cb         : (err, x) =>
+                            if cb?
+                                n += 1
+                                if n%50 == 0
+                                    dbg("did #{n} queries")
+                                cb?(err)
+                                cb = undefined  # so don't call again due to changefeed
+                            else
+                                dbg("change: #{user.first_name} #{user.last_name} #{x?.collaborators?.length}")
+                dbg("getting changefeeds for all #{collaborators.length}'s collaborators in parallel")
+                async.map collaborators, f, (err) =>
+                    dbg("done, time=#{misc.mswalltime(t)}")
+                    cb(err)
+            #(cb) =>
+            #    t = misc.mswalltime()
+            #    dbg("canceling all changefeeds")
+            #    f = (id, cb) =>
+            #        @user_query_cancel_changefeed(id:id)
+            #    async.map changefeeds, f, (err) =>
+            #        dbg("done, time=#{misc.mswalltime(t)}")
+            #        cb(err)
+        ], (err) =>
+            opts.cb?(err)
+        )
+
+
 
 has_null_leaf = (obj) ->
     for k, v of obj

                                    if not @_change_feeds?
                                        @_change_feeds = {}
                                    @_change_feeds[changefeed_id] = [feed]
                                    feed.each (err, x) =>
                                        #winston.debug("FEED #{changefeed_id} -- saw a change! #{misc.to_json([err,x])}")
                                        if not err
                                            @_query_set_defaults(x.new_val, opts.table, misc.keys(opts.query))
                                        else

    _init: (authKey) =>
        #discovery   : true  # this option conflicts with password auth -- https://github.com/neumino/rethinkdbdash/issues/133
        opts =
            maxExponent : 4    # 15 seconds?
            timeout     : 10
            buffer      : 100
            max         : 15000  # max = simultaneous queries -- the default of 1000 is *way* too low; 200 people logging in hits this and everythign hangs up.
            servers     : ({host:h, authKey:authKey} for h in @_hosts)
        @r = rethinkdbdash(opts)
        @db = @r.db(@_database)

