See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
| # --no-check-cerftificate was necessary for me to have wget not puke about https | |
| curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
| APP_ENV=local | |
| APP_DEBUG=true | |
| APP_KEY=base64:hyHUpukUUigKeEsxpGeTW4UZ+Lg+WAWxcc4/BjlgNtE= | |
| APP_URL=http://localhost | |
| DB_CONNECTION=pgsql | |
| DB_HOST=hostname | |
| DB_PORT=5432 | |
| DB_DATABASE=Your database name | |
| DB_USERNAME=Your database username |
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| /var/log/nginx_*.log { | |
| daily | |
| compress | |
| delaycompress | |
| rotate 2 | |
| missingok | |
| nocreate | |
| sharedscripts | |
| postrotate | |
| test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid` |
| # get total requests by status code | |
| awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
| # get top requesters by IP | |
| awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
| # get top requesters by user agent | |
| awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
| # get top requests by URL |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt