Skip to content

Instantly share code, notes, and snippets.

View adamcfraser's full-sized avatar

Adam Fraser adamcfraser

  • Couchbase
  • Vancouver, BC
View GitHub Profile
@adamcfraser
adamcfraser / gist:d3a274d9c8f432fc0d10
Created February 19, 2015 17:28
Process entry execution times
gateway 1
"PushToSubscriberInteractive/p95 average": 16.52,
"PushToSubscriberInteractive/p99 average": 20.34,
processEntry-execution-time-duplicate-00000ms: 821348,
processEntry-execution-time-next-00000ms: 11003,
processEntry-execution-time-next-00100ms: 773,
processEntry-execution-time-next-00200ms: 331,
processEntry-execution-time-next-00300ms: 139,
processEntry-execution-time-next-00400ms: 93,
processEntry-execution-time-next-00500ms: 74,
{
"log": ["HTTP", "HTTP+", "CRUD"],
"adminInterface": ":4985",
"maxIncomingConnections": {{conn_in}},
"maxCouchbaseConnections": {{conn_db}},
"maxFileDescriptors": 90000,
"slowServerCallWarningThreshold": 500,
"compressResponses": false,
"databases": {
"db": {
{
"log": ["HTTP", "HTTP+", "CRUD"],
"adminInterface": ":4985",
"maxIncomingConnections": {{conn_in}},
"maxCouchbaseConnections": {{conn_db}},
"maxFileDescriptors": 90000,
"slowServerCallWarningThreshold": 500,
"compressResponses": {{compression}},
"databases": {
"db": {
{
"log": ["HTTP", "HTTP+", "CRUD"],
"adminInterface": ":4985",
"maxIncomingConnections": {{conn_in}},
"maxCouchbaseConnections": {{conn_db}},
"maxFileDescriptors": 90000,
"slowServerCallWarningThreshold": 500,
"compressResponses": false,
"databases": {
"db": {
@adamcfraser
adamcfraser / gist:fb4549162f703c6cf862
Created March 19, 2015 21:20
Too many open files
15:11:05.030586 Changes: MultiChangesFeed({62329673_HT, 62329673_ST_15_01, 62329673_ST_15_02, 62329673_ST_15_03, mcdusers}, {Since:111905 Limit:0 Conflicts:true IncludeDocs:false Wait:false Continuous:false Terminator:0xc21e264660}) ...
15:11:05.031454 Changes+: MultiChangesFeed: channels expand to channels.TimedSet{"mcdusers":0x5, "62329673_ST_15_03":0x103b7, "62329673_ST_15_02":0xadbd, "62329673_HT":0x1667f} ...
15:11:05.031514 Cache: getCachedChanges("62329673_ST_15_03", {0 111905}) --> 0 changes valid from #1
15:11:05.031532 Cache: getCachedChanges("62329673_ST_15_02", {0 111905}) --> 0 changes valid from #1
15:11:05.031544 Changes: MultiChangesFeed done
15:11:05.031615 HTTP+: #147077: --> 200 OK (0.0 ms)
15:11:58.297379 HTTP: #147078: GET /mcd_sync_gateway/_local/cec7f1445877839323afaa8a8cb6cac2639946b3 (as 62329673)
15:11:58.298914 HTTP+: #147078: --> 200 (5.5 ms)
2015/03/11 15:11:58 http: Accept error: accept tcp [::]:4984: too many open files; retrying in 5ms
2015/03/11 15:11:58 http: Acc
@adamcfraser
adamcfraser / gist:4ed3858f7d42ce20cc49
Created March 19, 2015 21:22
Error when SG loses TAP feed
11:21:44.811669 WARNING: Couldn't interpret error type *net.OpError, value read tcp 10.133.104.105:11210: connection reset by peer -- base.ErrorAsHTTPStatus() at error.go:63
11:21:44.811747 HTTP: #031: --> 500 Internal error: read tcp 10.133.104.105:11210: connection reset by peer (2.0 ms)
11:21:44.815605 HTTP: #032: POST /mcd_sync_gateway/_session (ADMIN)
11:21:44.818754 WARNING: Couldn't interpret error type *net.OpError, value read tcp 10.133.104.105:11210: connection reset by peer -- base.ErrorAsHTTPStatus() at error.go:63
11:21:44.818800 HTTP: #032: --> 500 Internal error: read tcp 10.133.104.105:11210: connection reset by peer (3.2 ms)
11:21:45.106330 HTTP: #033: POST /mcd_sync_gateway/_session (ADMIN)
11:21:45.117515 HTTP+: #033: --> 200 (11.2 ms)
11:22:23.679341 HTTP: #034: POST /mcd_sync_gateway/_session (ADMIN)
11:22:23.682971 HTTP+: #034: --> 200 (3.7 ms)
@adamcfraser
adamcfraser / gist:1b1a855f7e787ce1b827
Last active August 29, 2015 14:17
Remote cache config
{
"log": ["HTTP", "HTTP+", "CRUD", "DCache"],
"adminInterface": ":4985",
"maxIncomingConnections": {{conn_in}},
"maxCouchbaseConnections": {{conn_db}},
"maxFileDescriptors": 90000,
"slowServerCallWarningThreshold": 500,
"compressResponses": {{compression}},
"databases": {
"db": {
@adamcfraser
adamcfraser / tests_webhooks_rev812.js
Last active August 29, 2015 14:20
tests_webhooks_rev812.js
var launcher = require("../lib/launcher"),
coax = require("coax"),
async = require("async"),
common = require("../tests/common"),
util = require("util"),
conf_file = process.env.CONF_FILE || 'local',
config = require('../config/' + conf_file),
test = require("tap").test,
test_time = process.env.TAP_TIMEOUT || 60,
test_conf = {timeout: test_time * 1000};
@adamcfraser
adamcfraser / testhttpserver.js
Created May 4, 2015 06:48
test http server with count
var http = require('http');
var qs = require('querystring')
var count = 0
http.createServer(function (req, res) {
var body = ''
req.on('data',function(data) {
body += data;
@adamcfraser
adamcfraser / gist:fcb6b9aaf7a203ef2327
Created May 4, 2015 06:52
812 test http server output
This file has been truncated, but you can view the full file.
Adams-MacBook-Pro-2:sync-gateway-tests adam$ node tests/testhttpserver.js
Server running at http://localhost:9091/
{ '{"_id":"api-revision1_0","_rev":"1-bf05ed21e6763f6167ccec78b2897414","_revisions":{"ids":["bf05ed21e6763f6167ccec78b2897414"],"start":1},"at":"2015-05-04T06:51:35.938Z","data":"04031230130231424330311230344401212333324122204321403020010342311220404434343313402024041121411121422232041333311200431340302141400132010123311304120332122121220201121222333041343430431041220202441132241241342103404004321031324323221230232321000401324014103202004234004031014401211402243340223204444242243130433232202410431320300130434122311124113044314032041400240343423020343030230112314132430132140403420213104114042020424022332424420110431331301100400434112202222013434440303412304234403202200414110001232041041331440103334443140302321333403112004322003114020021002103113223234244043143444243302141333121311211121021411433340210230130023424440330342300420211444343343033244434214403203023302333114200132011204014420111332330