• Today was a hellish day. Late in the afternoon when we’re supposed to be winding down and heading out one of our shared webhosting servers started freaking out. No changes to any software or settings — nothing to suspect — but mysql-proxy kept crashing. We need this utility because we have a lot of old customers with configs from a long time ago when someone thought it was OK to have the database on the webserver.

    We’ve never had much luck with mysql-proxy as we’ve seen it crash its fair amount of times or not start properly on boot, but this was unending. Core dumps weren’t giving anything useful; logs were no better. Here’s the MySQL-Proxy alternative that we should have implemented ages ago. Note, we’re running FreeBSD, so adapt to your own OS/Linux distro:

    What you need:


    net/socat
    net/haproxy

    FreeBSD’s rc.conf:


    # mysql_proxy alternative
    socat_enable="YES"
    socat_flags="UNIX-LISTEN:/tmp/mysql.sock,fork,reuseaddr,unlink-early,mode=777 TCP:127.0.0.1:3306"
    haproxy_enable="YES"

    HAProxy’s config:


    global
    log 127.0.0.1 local0
    maxconn 4096
    daemon
    #debug
    #quiet
    #
    defaults
    log global
    mode tcp
    option tcplog
    option dontlognull
    option tcp-smart-accept
    option tcp-smart-connect
    retries 3
    maxconn 200
    #
    listen mysql :3306
    mode tcp
    option mysql-check
    balance roundrobin
    server mysql1 1.2.3.4:3306 check port 3306

    Ultimately, HAProxy manages the connections very well and socat fixes any old clients trying to talk over the /tmp/mysql.sock file.

    Enjoy.

  •  

    via Hidden warning message found in Samsung’s Galaxy tablet » Technology Blog » Chipworks.

  • Seaworld employees unleash penguins on unsuspecting Southwest airline passengers:

  • I’m a hockey fan. It’s probably the only sport I enjoy watching. I also happen to be one of those new age hippies that doesn’t pay for cable or satellite… streaming content is the only thing I care about. I am not interested in paying for channels that do not interest me, so I don’t see the merits in paying for TV I won’t watch just so I can subscribe to NHL Center Ice.

    (more…)

  • Lots of interesting stuff including Ryan discussing OS/2 at length. This portion is especially compelling:

    I find if you’re targeting Windows, Linux, and Mac OS X right from the start, your code will probably work anywhere else that you might try it later.

    Not to long ago, people would say, “why bother? Everyone runs Windows!”

    But then the consoles became important.

    And smaller shops might still say, “well, I’m not targeting those anyhow!”

    But now they wish they had an iPad port.

    You never know what will be important tomorrow!

    via Interview: Ryan C. Gordon.

    The English version of the interview is unfortunately lacking this great picture so I have provided it for reference.