Skip to content

Instantly share code, notes, and snippets.

View Unitech's full-sized avatar

Alexandre Strzelewicz Unitech

View GitHub Profile
BUS system [READY] on port /home/tknew/.pm2/pub.sock
RPC interface [READY] on port /home/tknew/.pm2/rpc.sock
fs.js:79
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^
Error: ENOENT, unlink '/home/tknew/.pm2/rpc.sock'
at Error (native)
var timeseries = require('timeseries')({
rethinkdb : {
port : 28015,
host : 'localhost',
auth_key : null
},
redis : {
port : 6379,
host : 'localhost'
}
[
{
"created_at": Fri Oct 03 2014 13:01:27 GMT+00:00 ,
"data": {
"active": false ,
"process": [
{
"axm_actions": [ ],
"cpu": 0 ,
"created_at": 1412338920906 ,
[
   {
      "created_at": "Fri Oct 03 2014 13:01:27 GMT+00:00",
      "data": {
         "active": false,
         "process": [
            {
               "axm_actions": [],
               "cpu": 0,
               "created_at": 1412338920906,
[
   {
      "created_at": "Fri Oct 03 2014 13:01:27 GMT+00:00",
      "data": {
         "active": false,
         "process": [
            {
               "axm_actions": [],
               "cpu": 0,
               "created_at": 1412338920906,
var redisWrapper = require('./redisWrapper.js');
var events = require('events');
var redis = require('redis');
var client = redis.createClient();
/**
* Global event emitter
var profiler = require('profiler');
profiler.monitor('redis', redisClient);
// What is redisCLient ? Is it the return of require('redis') ?
profiler.monitor('mongodb', mongodb_client);
profiler.monitor('rethinkdb', rethinkdb_client);
profiler.on('query', function(parameters){
@Unitech
Unitech / auto-patch.js
Created October 8, 2014 15:01
auto-patch.js
var Proxy = require('./utils/proxy.js');
var RedisWrap = require('./wrapper/redis.js');
var Transaction = module.exports = {};
Transaction.patch = function() {
var Module = require('module');
Proxy.wrap(Module, '_load', function(load) {
return function(file) {
Error: Error setting TTL index on collection : sessions
at /var/www/km-api/source/node_modules/connect-mongo/lib/connect-mongo.js:161:23
at /var/www/km-api/source/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1404:28
at /var/www/km-api/source/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1542:30
at /var/www/km-api/source/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:159:22
at commandHandler (/var/www/km-api/source/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:678:48)
at Db._executeQueryCommand (/var/www/km-api/source/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1802:12)
at Cursor.nextObject (/var/www/km-api/source/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:729:13)
at Cursor.toArray (/var/www/km-api/source/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:158:10)
at Cursor.toArray (/var/www/km-api/source/node_modules/conn
XHR finished loading: POST "https://app.keymetrics.io/api/bucket/5435c6d37009b3c07e90436d/data/processEvents". angular.js:7997
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->