Symptom: Twitter API returns a 401 Unauthorized when you start the OAuth process by obtaining a bearer token. This can happen all of a sudden possibly breaking existing processes that were working.
Problem: The most likely culprit is the clock on your server. If this gets out of sync (even by as little as 20s), Twitter’s amazing API will barf and return a helpful “401 Unauthorized”
Solution: A simple
sudo ntpdate ntp.ubuntu.com
should fix it.
After deploying MongoDB 2.4.0 for the first time and connecting to it from a remote shell, it warned me:
MongoDB shell version: 2.4.0 connecting to: abc.com/test Server has startup warnings: Wed Mar 20 22:40:49.850 [initandlisten] Wed Mar 20 22:40:49.850 [initandlisten] ** WARNING: Readahead for /data/db is set to 2048KB Wed Mar 20 22:40:49.850 [initandlisten] ** We suggest setting it to 256KB (512 sectors) or less Wed Mar 20 22:40:49.850 [initandlisten] ** http://dochub.mongodb.org/core/readahead >
The fix for this turned out to be:
sudo blockdev --setra 256 /dev/md2
/dev/md2 is the disk where the database files are stored.