Use it for Kubernetes liveness & readiness checks. The middleware opens a HTTP server on port 3001. To check, open the http://localhost:3001/live & http://localhost:3001/ready URL.
{
"state": "up",
"uptime": 7.419,Use it for Kubernetes liveness & readiness checks. The middleware opens a HTTP server on port 3001. To check, open the http://localhost:3001/live & http://localhost:3001/ready URL.
{
"state": "up",
"uptime": 7.419,| import Vue from 'vue' | |
| import {DataStore, Record} from 'js-data' | |
| // define a base class that enables property-level vue reactivity. | |
| export class VueReactiveRecord extends Record { | |
| constructor (...args) { | |
| // among other things, this will apply js-data schema if configured to do so; be sure to do `track: true` | |
| super(...args) | |
| # Plain Ol' Node | |
| node --max-old-space-size=1024 app.js # increase to 1gb | |
| node --max-old-space-size=2048 app.js # increase to 2gb | |
| node --max-old-space-size=3072 app.js # increase to 3gb | |
| node --max-old-space-size=4096 app.js # increase to 4gb | |
| node --max-old-space-size=5120 app.js # increase to 5gb | |
| node --max-old-space-size=6144 app.js # increase to 6gb | |
| # For pm2 | |
| pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb |
On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:
2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files)
2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...
An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.
su to run ulimit on the nginx account, use ps aux | grep nginx to locate nginx's process IDs. Then query each process's file handle limits using cat /proc/pid/limits (where pid is the process id retrieved from ps). (Note: sudo may be necessary on your system for the cat command here, depending on your system.)fs.file-max = 70000 to /etc/sysctl.conf| /** | |
| * beforeCreate | |
| * | |
| * @module :: Policy | |
| * @description :: Simple policy to inject the user creating a record into the records values. | |
| * Assumes req.user && req.user.id to be set when a user is logged in. | |
| * @docs :: http://sailsjs.org/#!documentation/policies | |
| * | |
| */ |
| //This fragment goes in your config/http.js file. | |
| //Ensure to install skipper previusly... | |
| //Tested in Sails.js v0.10.5 | |
| module.exports.http = { | |
| bodyParser: (function () { | |
| var opts = {limit:'50mb'}; | |
| var fn; |
| #!/bin/bash | |
| # Adicione um novo remote; pode chamá-lo de "upstream": | |
| git remote add upstream https://github.com/usuario/projeto.git | |
| # Obtenha todos os branches deste novo remote, | |
| # como o upstream/master por exemplo: | |
| git fetch upstream |