Skip to content

Instantly share code, notes, and snippets.

View david-martin's full-sized avatar

David Martin david-martin

View GitHub Profile
@david-martin
david-martin / sync-acceptance-results_001.txt
Last active March 2, 2017 13:23
sync-acceptance-results
✓ should manage a dataset
✓ should list
X should create
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. (1)
✓ should read
✓ should fail when reading unknown uid
✓ should update
✓ should delete
- should create records created by other clients...LOCALDB error [Error: Incorrect format for database connection string.]
X should create records created by other clients
@david-martin
david-martin / stacks.txt
Last active March 15, 2017 11:03
glue.js stacks
TypeError: cb is not a function
at noSupport (/opt/app-root/src/lib/handlers/targets/openshift3/index.js:12:10)
at /opt/app-root/src/lib/handlers/targets/openshift3/index.js:106:12
at /opt/app-root/src/lib/handlers/targets/openshift3/index.js:112:26
at /opt/app-root/src/lib/handlers/mbaas.js:94:38
at Layer.handle [as handle_request] (/opt/app-root/src/node_modules/express/lib/router/layer.js:76:5)
at next (/opt/app-root/src/node_modules/express/lib/router/route.js:100:13)
at /opt/app-root/src/lib/handlers/targets/openshift3/prefetch.js:48:12
at /opt/app-root/src/lib/handlers/targets/openshift3/prefetch.js:37:12
at setup (/opt/app-root/src/lib/handlers/targets/openshift3/prefetch.js:8:10)
@david-martin
david-martin / enable_metrics.js
Created March 27, 2017 09:09
Enable Sync metrics to influxdb
fh.events.on('sync:ready', function(){
var syncConfig = {
metricsInfluxdbHost: process.env.METRICS_HOST,
metricsInfluxdbPort: parseInt(process.env.METRICS_PORT)
};
fh.sync.setConfig(syncConfig);
});
<--- Last few GCs --->
21777 ms: Scavenge 1022.0 (1072.0) -> 1022.0 (1072.0) MB, 0.1 / 0 ms (+ 1.2 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
22200 ms: Mark-sweep 1022.0 (1072.0) -> 1021.9 (1072.0) MB, 423.0 / 0 ms (+ 1.8 ms in 2 steps since start of marking, biggest step 1.2 ms) [last resort gc].
22676 ms: Mark-sweep 1021.9 (1072.0) -> 1021.9 (1072.0) MB, 475.6 / 0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
[dmartin@rollins-tp Downloads]$ node --max_old_space_size=17000 test.js
64223824
135745944
202980624
234982960
319800456
351802496
463027848
495292048
527293952
$ DEBUG=* node index.js
server New HTTP server +0ms
server Start the HTTP server +145ms
Server running at http://localhost:1337
db Connecting the database +3s
Connected as ID 6
Kurtis
1
Aurelie
[dmartin@rollins-tp grunt-peer-dep]$ node -v
v4.8.2
[dmartin@rollins-tp grunt-peer-dep]$ rm -rf node_modules/
[dmartin@rollins-tp grunt-peer-dep]$ npm i
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
> [email protected] postinstall /tmp/grunt-peer-dep/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin
> node lib/install.js
@david-martin
david-martin / output.txt
Created April 13, 2017 12:46
Use `node test.js` to run. Expected output in output.txt. This demonstrates a 'socket hang up' ECONNRESET error. There is a backend server (on port 8002) and a proxy server (on port 8001). The proxy server will proxy onto the backend server. The proxy server has a timeout of 1 second on any request it proxies to the backend server. The backend s…
proxyServer listending on 8001
backendServer listending on 8002
proxy error { [Error: socket hang up] code: 'ECONNRESET' }
sending response
@david-martin
david-martin / output.log
Created May 2, 2017 11:31
INFLUXDB_HOST=somehost INFLUXDB_PORT=8086 node --max_old_space_size=8000 use-memory-but-allow-gc.js
INFLUXDB_HOST=somehost INFLUXDB_PORT=8086 node --max_old_space_size=8000 use-memory-but-allow-gc.js
Tue May 02 2017 12:28:22 GMT+0100 (IST) 1.1% 91932768 / 8455716864
Tue May 02 2017 12:28:22 GMT+0100 (IST) GC happened TYPE 1 BEFORE 4089488 AFTER 3526888
Tue May 02 2017 12:28:22 GMT+0100 (IST) GC happened TYPE 1 BEFORE 8639312 AFTER 7484792
Tue May 02 2017 12:28:22 GMT+0100 (IST) GC happened TYPE 1 BEFORE 9082472 AFTER 8329360
Tue May 02 2017 12:28:22 GMT+0100 (IST) GC happened TYPE 1 BEFORE 9347032 AFTER 8875640
Tue May 02 2017 12:28:22 GMT+0100 (IST) GC happened TYPE 1 BEFORE 12233432 AFTER 10571976
Tue May 02 2017 12:28:22 GMT+0100 (IST) GC happened TYPE 1 BEFORE 12732200 AFTER 11642696
Tue May 02 2017 12:28:22 GMT+0100 (IST) GC happened TYPE 1 BEFORE 15463016 AFTER 13731688
Cloning "https://github.com/feedhenry-templates/helloworld-cloud" ...
Commit: 904aa80bf4e92b629ad2e7ae4ad75a4f6e833681 (Merge branch update-mbaas-api-7.0.9)
Author: Wei Li <[email protected]>
Date: Tue May 16 15:38:04 2017 +0100
Using HTTP proxy http://XXXXX@XXXXXXX:3128 and HTTPS proxy http://XXXXX@XXXXXXX:3128 for script download
---> Installing application source
---> Setting npm http proxy to http://XXXXX@XXXXXXX:3128
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]