Wondering what’s been happening with the offline problems and loss of some posts? Here’s DU’s sys admin, Marc Perkel, to explain it all.

And for those who keep popping off in the comments to posts about Windows or Mac, tell us again why Linux is the future and we’re all idiots for not seeing the light?

Here’s what’s happening.

In order to spread the load and increase capacity I was trying to move the MySQL server to another computer with the main server handling the web and the second server running the MySQL database. Even though I have 8 gigs of ram in the main server every now and then for some reason I can’t explain memory usage soars the the server quits working due to high load.

Most all applications talk to MySQL through “localhost” that resolves to IP address 127.0.0.1 port 3306. Normally moving this service is trivial. I just shut down the database on the main server, move the database to another server, start it up there. Then I set up an SSH tunnel that pipes requests from the main server to the new server by intercepting requests and transporting them over TCP. Generally this just works.

However…

The morons at MySQL decided to redefine the meaning of “localhost” and when an application uses “localhost” the client libraries force it to be redirected to talk to the Unix socket /var/lib/mysql/mysql.sock instead of the TCP port. Why they did this is crazy beyond belief but there’s no way to override it short of downloading the source code and fixing it and recompiling MySQL which is the standard answer that you get whenever you complain too much about Open Source.

I however don’t give up so easily. I found a Linux utility called “socat” (socket concatenate ?) that allowed me to create a fake Unix socket and pipe it to a TCP port. And it worked – for a while. But it wasn’t reliable. As long as I was awake and in front of the computer it worked fine. But as soon as I went to sleep it shut down. So I wake up to a mailbox full of “my web site is down”.

So – I put it back on the main server till I find a real solution.

But – this is yet another example of why open source will never fully replace paid for software. If you have a commercial product people can call up the vendor and scream at them to fix bugs. When I sold commercial software and someone called me needing something fixed or added I usually had it the same day. However in the open source world you have a lot of people who have a highly inflated sense of importance who think their software is the greatest thing that was ever written and it’s crap!

What it comes down to as far as I can tell is the VI editor that comes with Unix causes brain damage. I’m totally serious about this. The VI editor absolutely sucks. It’s years behind editors I got with DOS 20 years ago and is an example of how to make an interface that totally sucks. I have refused to learn this editor because I find it offensive. I do most all my editing with a Windows editor, Textpad, and I run Samba on the Linux boxes so that I can mount them from Windows. That’s because there are no good editors in the Linux world. Other than that I use Pico which is a great little Unix editor for quick and dirty but still isn’t up to the kind of power I had in DOS or even CP/M (Wordstar) which is a better editor than any text mode editor in the Unix world.

I’m still waiting for Linux to catch up to CP/M!!!

My theory is that when people use VI it lowers their standards as to what good software should look like and causes their minds to physically alter in a way that leads to VI syndrome leading to delusions that their little piece of shit software is the greatest program in the world and that they are just so superior to microsoft that it’s just a matter of days before Microsoft collapses and everyone accepts Linux as God.

But what the open source world doesn’t get is that Windows programs actually WORK! If you want to install a windows application you download it, click NEXT, AGREE, NEXT, NEXT, NEXT, FINISH and the program is running. In the Linux world this almost never happens and when it does you’re almost sure that something has to be wrong. In Linux you have to edit cryptic config files with poor documentation. Then you try to run the application, get an error, Google the error, and go back and edit again. After many hours you might have it working or you might have to give up.

Out here in the real world localhost = 127.0.0.1 everywhere EXCEPT in MySQL. Not only did they hard code the bizarre behavior but have no way to override it. In fact they do the opposite. Whatever you set the configuration to they override it and force you to use the Unix socket. So doing something that should be simple becomes a nightmare. And you can’t talk to them because they have VI syndrome.



  1. Marc B says:

    Why the heck are you using an external SSH tunnel to do the MySQL connections? MySQL is perfectly capable of using SSL to encrypt any over-the-network connections without having to stuff an SSH redirector into the works.

    I’m guessing something kills your SSH tunnel, causing data to pile up and suck up all your ram. With the external tunnel, MySQL can’t do anything about it. It’ll just keep spamming data at a port that’s no longer accepting it. With the built-in SSL support, if the link goes down, MySQL can at least attempt to restart the link.

    Read up section 5.8.7.2 (for v5.0 MySQL servers) of the MySQL manual on using SSL on its remote connections.

    As for complaining about the localhost business, I agree it is kinda weird to specify 127.0.0.1/localhost and not have it go via TCP, but unix domain sockets are FAR faster and more efficient than having to roundtrip everything through the TCP stack. It may be a weird special casing by MySQL, but it is for performance reasons.

    Sounds like your setup is a large case of being unwilling/unable to modify your web apps to point the new DB server, and adding an extra layer of complexity/point of failure into the mix (the SSH tunnel). Don’t blame MySQL for doing what it’s supposed to.

  2. TIHZ_HO says:

    Well, you get what you pay for…

    Cheers

  3. steelcobra says:

    Converting a single server into a farm in WinServ 03: Freaking easy. Sharepoint Server, in fact, is designed so you can expand it from single box to a farm with one being SQL, another the ASPX presentation server, etc., with little to no effort beyond bringing the new box up to baseline.

    33: So, if he needs to do something for his specific setup, and MySQL can’t adapt, it’s his fault?

  4. ECA says:

    What I find interesting…
    Is the OLD programmers, had to be ‘Down and dirty’, and had time to learn ALOT.
    The current programmers arent more then 25-30 years old, and NEVER had to work with or DEAL with the other systems, and programming.
    The old formats, had to be ‘TIGHT’ and WORK as well as be configurable and adaptable..
    These new programmers, think they can add BELLS and whisles, and write sloppy programming, or DONT CARE, or even release CRAP, just to make things look good.
    Windows is almost as bad…
    So WHAT, that the Core parts are compressed, and almost machine language, 90% of the power goes to the scripts that are being run. Which explains why ALOT of stuff LAGGS, or/and has memory leaks.

  5. AlexV says:

    It’s not about adapting. This guy is trying to wedge a hack into a production environment. MySQL was made to be scalable and has time-proven and effective ways and tools to do so. If this guy is too ignorant to learn how to use them properly (which is what it sounds like judging by his vim rant), why is he even talking? Sounds like he’s just amazingly incompetent.

  6. Jägermeister says:

    #34 – TIHZ_HO

    Yep, pay peanuts, get monkey.

  7. Jägermeister says:

    #36 – ECA – Is the OLD programmers, had to be ‘Down and dirty’, and had time to learn ALOT.
    The current programmers arent more then 25-30 years old, and NEVER had to work with or DEAL with the other systems, and programming.
    The old formats, had to be ‘TIGHT’ and WORK as well as be configurable and adaptable..
    These new programmers, think they can add BELLS and whisles, and write sloppy programming, or DONT CARE, or even release CRAP, just to make things look good.

    Good post ECA. Fully agree. I’ve seen all too many “professionals” who learned programming with VB and ASP… they don’t know a shit of how it all hangs together.

  8. ECA says:

    37,
    also think of the person useing this software, and then SOMEONE changes a major PART of that software…
    After a person gets USED to using a piece of software…WHY should he RELEARN it over again..
    Adding a command is one thing, but changing HOW a command works, SUCKS.
    Try the old ‘PRINT’ command…It had a great use. Then people added, other options to it. THEN it went away, and we have to use OTHER ways to do the same command.

    Option is to revert to the OLD, ADD the commands from the NEW(if possible) or DITCH IT and go for something BETTER.

  9. #29 — what are you talking about? There is no such thing as a Dodge Impala. The Impala was a Chevy. Cripes.

  10. Tsavo says:

    ChryMoCo made two special edition limos for Presidents Clinton and Geedub.

    Although you won’t read any word of the Dodge Drafter in the automotive press.

  11. Dave says:

    VI and emacs are both pretty tough to learn and use. Why bother when there are GUI type editors and other editors for non GUI work.

    It is true that Linux config files are cryptic, sometimes hard to locate and often hard to modify. It is true, get over it.

    VISTA is awful, XP is wonderful. It is true.

    I use Ubuntu. It is better than Vista. I can do anything I need to in OS software in terms of Word Processing, number crunching (excel) and presentations.

    When Linux works it is super. When not it stinks.

    Linux isn’t going to take over the world. It is true, Get over it.

  12. Awake says:

    My favorite word for some of the postings, both in the main postings and the comments has become: PATHETIC.

    Lets start with the “VI” rant, something that takes up 2/3 of the posting.
    Is the reason that the system is unstable just that the “SysAdmin” doesn’t know how to use “VI”? Considering “VI” is the most basic tool used for making small changes to configuration files, it seems to me that the lack of experience is really showing. “Me server doesn’t work.. stupid VI is to blame” Waahhhh!

    Then the whole “localhost” rant. Guess what… “LocalHost” is exactly what they are calling it: the “Local Host”. It just seems to me that the initial configuration was made so that the system would always be running locally, with no consideration for shared services. It is the initial configuration that is ‘cheaply’ implemented, and needs to be corrected. Whining that something configured to talk to a “Local” host won’t just talk to an “External” host without reconfiguring sounds pretty pathetic.

    And finally the “Commercial software offers real support” rant, and calling a misconfiguration issue a bug.
    Yeah, you can call Microsoft or Oracle or whomever and they will immediately jump to attention, salute and fix THEIR software to resolve YOUR misconfiguration problems. That happens ALL the time.

  13. JoaoPT says:

    #45

    No, Commercial software is BAD, but OSS is WORSE!, if you’re not a programmer…

    Linux will never ever, ever be dominant. Get over it.
    But Mr. Perkel should know better than to post an anti-OSS rant on the Net.

  14. Jägermeister says:

    #46 – JoaoPT

    IE is commercial software and sure as hell is worse than Firefox.

  15. j0nkatz says:

    I really felt sorry for that admin until I saw the word ‘MySQL’.

    You get what you pay for!!!

  16. JoaoPT says:

    #47 IE is Closed Source Software, but it is not Commercial…

  17. mperkel says:

    MySQL is FREE. I paid nothing for it. I got what I paid for and it is totally worth it.

  18. Jägermeister says:

    #49 -JoaoPT

    I stand corrected… but IE is still a POS.

  19. Jägermeister says:

    #51 – Pedro

    So what’s #1? Netscape 4.79? 😀

  20. hhopper says:

    I have to put in my two cents about VI. I used to do a hell of a lot of C Shell scripting in unix (hpux.) VI may be strange and hard to learn but when you do learn it, it’s the fastest damn editor ever written. You never have to look at the keyboard. There are easy key strokes to do just about anything.

    Like I said, when you are very familiar with it, it is a really easy, fast editor.

  21. Fratm says:

    #55, unlike any MS Product, because we know those are 100% finished, and have zero bugs.

    -Fratm

  22. Jägermeister says:

    #55 – Briar – I last used vi 30 years ago ffs!

    It’s like saying “I last used MS Windows 21 years ago ffs!”… and think that it’s still comparable to the current version.

  23. Brad Dunlap says:

    You guys amaze me!

    I have no idea who’s right and whos wrong on this issue. I’m not a computer guru like most of you guys. Computers are my hobby, not my profession. Having said that………. reading this string makes me want to quit trying Open Source software. Not because of the software itself but the type of people who are the experts in it. Some of you guys are just plain rude!

    Give the guy a break! Quit calling him incompetent. He did us all a favor by posting an explanation. He didn’t have to. He could have remained silent. Wether he is right or wrong at this point is moot. If he’s wrong – tell him, but don’t rub his nose in it. It serves no purpose.

  24. Greg Allen says:

    I’d like to bicker with the headline of this post.

    First — it’s amazing that Open Source even exists.
    Second — that so much of it works well.

    I’m just a lowly average “end user” but I’m totally delighted with:

    Firefox
    Thunderbird
    OpenOffice
    Filezilla
    Audacity (with LAME and FLAC)

    Which I use ALL TIME, with remarkably few problems. Now, before ever consider getting a commercial program, I check to see if there is an Open Source version. Not just because it is free but because my favorite Open Source programs seem better — less bloated and crash prone.

    I thank everybody who helped develop those and the handful of other free programs that I use less often.

  25. Chris Brannon says:

    nedit is a great and easy to use GUI editor available on linux/unix. I highly recommend it.

    It really doesn’t take that long to learn the 15 or so most commonly needed vi commands, though. You could do just about anything just knowing:

    In cmd mode:
    :23 takes you to line 23
    :q quits
    :w writes
    :wq! forces a write and quits
    /text searches for the characters “text”
    dd deletes the current line
    5dd deletes 5 lines
    P pasts whatever you just deleted above the current line
    p pasts whatever you just deleted below the current line
    O inserts a line and switches to edit mode
    o inserts a line and switches to edit mode
    i switch to insert mode
    cw changes word (at the start of word hit cw then type to replace the word)
    x delete a character
    0 move to start of line
    $ move to end of line
    in edit mode, hit esc to return to cmd mode.

  26. Angel H. Wong says:

    #4

    “This is due to both creeping featurism and normal software entropy.”

    Each day Hardware becomes smaller, cheaper and faster whereas each day Software becomes bigger, more expensive and slower.

  27. Ben Dover says:

    Alright, go out and spend some money on MS SQL Server, or better yet, Oracle! If open-source software sucks, then DON’T USE IT !!!

    I do have to agree about vi/vim. Vi is the most arcane, antiquated p.o.s. program I have ever used. Pico, and nano have long since rendered vi obsolete.

    I would not go as far as to say Windows programs just work… Windows XP has an incredibly high suck-factor. Vista is shaping up to parallel that fact very quickly. Spend the money on Windows, or Unix servers, you ‘ll find it doesn’t get any easier…

    /B

  28. Linux User says:

    I am seriously surprised and incredibly disappointed by this post, as well as mildly upset.

    First point I’d like to make is just because Marc has a problem does not make it that all “Open Source Software Sucks!!”. That is a ridiculous, inflammatory claim, which borders on down right stupidity. One person’s experience with a product can never be extrapolated to cover the entire product (unless only one product is sold/issued) let a lone a category as vast as Open Source, which is quite expansive. It is the equivalent of me buying a Ford Taurus that turns out to be a bad lemon within the first year. Following that I encounter difficulty with the warranty/dealership that causes me tremendous personal grief. Finally, I extrapolate from that experience that each and every American car manufacturer sucks royally. It’s childish, if you can’t see the problem with that logic then you clearly didn’t graduate from elementary school.

    On a related note. To your one bad experience with OSS I can personally cite hundreds of success stories of people I have helped and guided via the Ubuntu forums to use Linux daily and without trouble. I can also equally site 10’s of thousands of Windows/Microsoft horror stories and even hundreds of Apple ones (yes, Apple isn’t perfect).

    Secondly, as indicated by numerous others there are good editors on Linux if you look. I happen to have tried quite a few and am happy using Nano (CLI) and gedit (GUI) at this time.

    Lastly, if you don’t like it don’t use it. Simple enough. We don’t force anyone to use our software. We don’t cripple our code with DRM and other methods to lock people in or tie it to hardware like Apple. If you don’t like MySQL and the lot, stop using it. Go spend your money on paid for products and then you will get your wish of the “top quality service” you seem to rave about.

    That’s all I got to say. Yes, I was mildly abrasive but only in response to the troll like nature of the original rant. Oh and no, not all Linux/Unix folk are rude egotistical SOBs that tell you to RTFM, have horrible support their projects and are overall poor in the personal relations department.

    Annoyed Linux User

  29. mperkel says:

    I once wrote a multitasking Forth compiler that was just 12k of code.

  30. Chuck Hamilton says:

    John – Your memory seems a little lacking here. Given that both you and I were at the 1985 release party for Windows 1.0 (you as the MC on the podium, me as a crowd member snagging two copies of Win 1.0 from the booth babes” who were tossing them from the back of the golf carts), I would expect more foresight. My memory says it took MS – as a commercial supplier – 10 years to make Windows the kind of software we could use reliably (Win95). And that’s the point here – Linux has nothing but time to get better, and it will. Linux may never catch-up to Windows Server, but it doesn’t really have to. All it needs to do is continue to get better, thus increaseg the need for Microsoft to demonstrate “added value” for their price. And that’s my point.

    My best analogy here is to PCs servers and Minicomputers. At the same time as that long-ago Comdex in 1985, the dominant “hot” business machines as application platforms were from DEC, HP, Data General, Prime, and the rest of the Mini makers. A PC AT could barely run 2-3 people on XENIX in comparison. But the nature of commodity-based hardware platforms meant eventual domination by Intel architecture and the associated component makers (hard disks, memory, etc.). All those proprietary mini vendors couldn’t compete with their own CPUs, disks, memory, etc. (all designed to work well together in each vendor’s case, but expensive as hell). The AT-bus machines, and the PCI-ones that came after them killed off the Minis as the commodity platforms got better and more sophisticated over time.

    Microsoft’s OS dominance is to me very similar to the Min dominance in the 1980’s; it can continue to command a premium only so long as there isn’t a reasonable but less expensive alternative. This alternative does not have to be “better’ or even as good; just “good enough”. Linux for a lot of work today falls into the “good enough” category, and as people continue to work on it over time, it will only get more so.

    In your specific case, it’s not Linux that is the problem, but MySQL, so arguing that the entire stack is worthless it silly. Either find someone with deep knowledge of MySQL to help your sys admin, or migrate to a “real” database / like ORACLE or DB2 for LINUX / until MySQL meets your requirements. Again, tie the use of OSS to the requirements; if the OS is fine but the DBMS doesn’t yet meet your requirements, use the OSS OS and commercial DBMS.

    And for your own good, please try to be a little less **cranky** here about OSS and LINUX, or you could find yourself compared to Ken Olson in the future. Remember him – the founder of Digital Equipment (DEC)? He’s not only known for once saying “There is no reason for any individual to have a computer in his home.” but also for reputedly saying: “UNIX is snake oil.” I would say history has rendered final judgment on both comments. Where is DEC now (the biggest of the Minicomputer makers)?

    Linux is like the AT-bus; a part of the overall environment – PERMANENTLY. That’s the big change here, and why it matters. I agree that the monetary and support models for commercial use of OSS still need to evolve, but nobody – not even Balmer – can stop continued commoditiization of the software stack by OSS alternatives. That’s why Linux matters, and why it use of it (and BSD and even OSX) will continue to grow.


2

Bad Behavior has blocked 8961 access attempts in the last 7 days.