SCRIPT: Automatic CouchDB CompactionAs you probably know CouchDB will not automatically reclaim unused space, nor compact or clean up its views during normal operation. Instead these processes are meant to be run at optimal times (ie; off peak hours) so they do not affect user performance during critical periods.
Today it's common to have a single web site but multiple URLs which you want funnel visitors from. For example if you've purchased .Net and .Org variations of your domain name you want visitors to see your .Com web site, even if they type in the .Net URL.
You also might want to provide a short URL for advertising purposes. For example http://www.mydomain.com/specials/contests/spring-2011/ might have the details of a contest you are running. Having a shorter URL such as http://mydomain.com/contest/ makes it easier to work into promotional materials and for visitors to remember and enter.
I had been looking at MySQL alternatives for some time, and have been watching the “No SQL” movement grow. About a month ago I finally decided to take the plunge and selected CouchDB as the default storage mechanism for my applications moving forward.
I was originally drawn to CouchDB because of its use of JSON directly and its amazing replication. As I started migrating my code I quickly discovered what web-dev life was like without SQL. And I liked it.
One of the most common questions that arise when migrating customers from one hosting company to another is a variation on this subject. Most people are unaware of the multistage process that occurs between them typing in (for example) http://www.ateamsystems.com/ and the web page being displayed on their screen.
There are 3 main pieces required for any web site to work: The chart below details how these are accessed when a visitor goes to a web site.
After updating ProFTPd on a server running FreeBSD, certain clients (FireFTP specifically) were able to log in, but not transfer files or retrieve a directory listing. The following error was shown to the client user:
425 Unable to build data connection: Operation not permitted
I recently ran into an issue when running the output of tail -F file.log through a series of multiple grep instances.
One level of grep worked fine and I saw the output in real time. However, once I added a second level, I would get nothing for minutes after, then sudden output (at first I thought my regex syntax was off).
The dig(1) command is a handy DNS information and troubleshooting tool. It can be used to grab a host or domain's TTL (time to live) values.
This information can be critical to planning a DNS cut over, and how long to leave the old server on.
Below is a simple but effective script to bring Atlassian Confluence under control of FreeBSD's rc.d script system. This is designed for Confluence in standalone configuration, ie; with its own dedicated Tomcat instance.
Out of the box, FreeBSD's default SNMP daemon bsnmpd(1) does not support the UCD-SNMP-MIBs which is where all the "good stuff" like CPU, disk, network and memory that us sysadmins like to monitor. Adding this module is as easy as installing the bsnmp-ucd port and doing a quick update to bsnmp's config file:
After updating Apache httpd on a server running FreeBSD, it went offline at exactly midnight the following night, producing a log entry like this in httpd-errors:
[Tue Aug 10 00:00:01 2010] [notice] SIGHUP received. Attempting to restart
[Tue Aug 10 00:00:01 2010] [notice] seg fault or similar nasty error detected in the parent process
I also to run across this error when working with certain FreeBSD VMs (FreeBSD 7 and 8.0, 8.1). I think the vmware-guestd6 port is missing a dependency. Here is the problem:
# /usr/local/etc/rc.d/vmware-guestd start
/usr/local/etc/rc.d/vmware-guestd: WARNING: failed to start vmware_guestd
I seem to run across this error when working with certain ESX based FreeBSD VMs (FreeBSD 7 and 8.0, 8.1). My suspicion is that the VMWare tools image that gets mounted when installing the guest tools is mismatching what the port expects, depending on the server's copy of VMWare Tools.
# cd /usr/ports/emulators/vmware-guestd6
# make install clean
--- (snip of normal compiling until the error below) ---
install: /usr/ports/emulators/vmware-guestd6/work/vmmemctl-only/vmmemctl.ko: No such file or directory
*** Error code 71
Any problems and their solutions discussed here are designed to be examples and may not exactly match your situation.
No warranty is provided or implied with these articles, if it's critical contact us: we support and guarantee all of our work.