From the category archives:

Quick Tips

Nginx 502 Bad Gateway Error

February 1, 2010

If you get the following error thrown from nginx: “upstream sent too big header while reading response header from upstream” you might well need to increase your proxy header sizes in the config to: proxy_connect_timeout 90; proxy_send_timeout 180; proxy_read_timeout 180; proxy_buffer_size 16k; proxy_buffers 8 16k; proxy_busy_buffers_size 32k; proxy_intercept_errors on; We were stuffing quite a few [...]

Read the full article →

Finding which package a file belongs to on Debian

December 14, 2009

With Debian there is a handy utility called apt-file which allows you to see which package owns a file even if it is not currently installed. I used it earlier to find where “mysql_config” lived so I could upgrade DBD::mysql. aptitude install apt-file && apt-file update then apt-file search filename

Read the full article →

Running a unix command as a background process

December 14, 2009

If you run a command and it takes a long time on unix it blocks the current terminal, however, if you hit CTRL – Z it pauses the job, then if you type bg it resumes the job in the background freeing up the current terminal. Also, if you prepend a & before executing the [...]

Read the full article →

Kill A Process Using It’s PID File

December 7, 2009

Quick Tip: kill $(cat /var/run/redis.pid) I needed to do that earlier and didn’t know how. EDIT: Turns out you can just do this as well: kill `cat /var/run/redis.pid`

Read the full article →

LWP::UserAgent and SSL

August 21, 2009

I’ve just spent the best part of a day, banging my head, trying to figure out why I couldn’t get LWP::UserAgent to connect to a URL (which happened to be an https url). I was looking at headers, manually in the browser, tried sending the request through a proxy, and finally, earlier today I used [...]

Read the full article →

Textmate and Git

August 20, 2009

If you’ve installed git and use textmate you may receive errors about git not being installed correctly until you do the following: run “which git” on the command line and note the output. in textmate write “echo $PATH” and check to see that the path returned from which git is present – in my case [...]

Read the full article →