Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre qmail (publicaciones antiguas, página 3)

vmysql: sql error[3]: MySQL server has gone away

Well, I am in the mid­dle of mi­grat­ing a rather large mail server, us­ing qmail+vpop­mail+mysql+­couri­er-imap.

And just when it's start­ing in­to pro­duc­tion us­age, we find the er­ror in the ti­tle.

A lot.

Sad­ly, since that er­ror in­di­cates a failed MySQL query, it means you get stuff like ran­dom auth fail­ures. Which sucks a lot.

Googling gave a lot of hints. But noth­ing would fix it.

Un­til.... lucky strike.

So, I will put my so­lu­tion here for fu­ture googler­s.

If you see this:

vmysql: sql error[3]: MySQL server has gone away
vmysql: sql error[3]: MySQL server has gone away
vmysql: sql error[3]: MySQL server has gone away
vmysql: sql error[3]: MySQL server has gone away
vmysql: sql error[3]: MySQL server has gone away

Do the fol­low­ing:

  1. Check if you are ex­ceed­ing mysql's max_­­con­nec­­tions pa­ram­e­ter. The de­­fault is 100.

  2. Check if your cpu can take the load. (No, don't look at the load av­er­age. Look at the CPU us­age).

  3. Make re­al­­ly sure that vpop­­mail and couri­er-au­th­lib are built us­ing the ex­act mysql you have in­­stalled. No, it does­n't mat­ter if it's the same ver­­sion. Go, and re­build the things!

That fixed it for me.

On oth­er bizarre news about this server, I have low CPU us­age (95% idle), low IO (io­stat re­ports un­der 1M­B/sec, 40 tp­s), yet I have a load that can go up to 120.

Yet, in­ter­ac­tive re­sponse is fine.


Simple password validation

I am writ­ing a sort of we­b-based ad­min tool for a clien­t, and I had this prob­lem: How do you val­i­date a sys­tem us­er from a scrip­t?

Well, this is how:

def validPass(name,password):
     p=os.popen('/usr/bin/checkpassword-pam -s login -- /bin/true 3<&0','w')
     if r==None: #Success
             return True
             return False

Just get check­pass­word-­pam from some­where.

Or, if you use some oth­er sort of au­then­ti­ca­tion scheme, some oth­er check­pass­word. They are meant for qmail, but they are very handy :-)

Why equation evolution and religion is wrong

Be it evo­lu­tion in gen­er­al, mi­cro-evo­lu­tion or macro-evo­lu­tion.

Let's start with Ger­vase's three points:

  • It's a ba­sic po­si­­tion that you hold about the na­­ture of re­al­i­­ty that's not prov­able - it's a faith po­si­­tion.

  • It's some­thing that you put your trust in, and live your life on the ba­­sis of.

  • It's some­thing you urge oth­­ers to be­lieve as the truth.

Per­haps the third ap­plies to evo­lu­tion, The oth­er two are garbage.

Let's start with the first one. There's this nifty con­cept called fal­si­fi­a­bil­i­ty (sor­ry about the spelling). Some­thing is fal­si­fi­able if it can be proven false.

Things that are un­fal­si­fi­able are not apt for ra­tio­nal dis­cus­sion, since the truth val­ue be­hind the propo­si­tion is un­know­able.

Here's an ex­am­ple of some­thing that's un­fal­si­fi­able: there is a supreme be­ing that com­mands the whole uni­verse, yet is not part of it, and can not be con­tact­ed.

Here's some­thing that's not: ran­dom mu­ta­tions get se­lect­ed by the en­vi­ron­ment to pros­per.

That is, be­cause it can be proven false. If there were no mu­ta­tion­s, it would be false. If ex­pos­ing difer­ent breeds to en­vi­ron­ments caus­es no dif­fer­en­tial in sur­vival rate, it is proven false.

Yes, this is the mi­cro-evo­lu­tion Ger­vase ac­cept­s. Macro-evo­lu­tion sim­ply ex­trap­o­lates from this gen­er­al­ly ac­cept­ed the­o­ry in­to a larg­er one. Is it the right one? Not sure.

There is no imag­in­able ex­per­i­ment that can prove the in­ex­is­tence of god. That's why god's ex­is­tence is a re­li­gious mat­ter, and not a sci­en­tif­ic one. The ex­is­tence of mi­croevo­lu­tion can be seen, and even ex­per­i­ment­ed (ask any guy that hap­pens to have a few hun­dred fruit flies in a bot­tle).

As for macroevo­lu­tion, well, as mpyne says, there is a thnk­able ex­per­i­men­t. And even if it is­n't tech­ni­cal­ly fea­si­ble, there can be a ra­tio­nal dis­cus­sion, re­gard­ing the re­com­bi­na­tion spped­s, and ra­di­a­tion lev­els pro­duc­ing mu­ta­tion­s, and vol­umes, and timescales.

So, dis­cussing it is a ra­tio­nal process.

As for the sec­ond point: I doubt any­one lives his life based on evo­lu­tion, al­though it can pro­vide some rea­son­able tips about how to ex­pect things to hap­pen, but that's most­ly rea­son­ing by anal­o­gy.

Now re­li­gion.. one of its pur­pos­es is usu­al­ly to de­scribe how you should live.

So, what Ger­vase is de­scrib­ing is re­li­gion. And by his def­i­ni­tion, evo­lu­tion ain't.

Evo­lu­tion the­o­ry may be wrong. That's ok. It hap­pens to al­most all the­o­ries in one way or an­oth­er, usu­al­ly they end re­placed by a slight­ly evolved new ver­sion.

But re­li­gion? Well, dude, that's just an­oth­er name for who the hell knows. If you ac­cept re­li­gion as a premise, you are in­to voodoo land.

Maybe the uni­verse on­ly ex­ists since 1987, and ev­ery­thing ear­li­er is a thought in god's mind. Who knows? Pre­summably on­ly him.

Maybe he's cranky and we all die and go to hell to­mor­row. He's many things but not rea­son­able, as ev­i­denced by his al­leged handy­work.

So, what's the point in ar­gu­ing a sub­ject where no ra­tio­nal dis­course is ap­propi­ate, a sub­ject which is the very ba­sis of ir­ra­tional dis­course?

I have no idea. That's why I'm an ag­nos­tic.

Very hacked-up qmail

I have been in­stalling qmail servers for a while.

I start­ed by us­ing Bu­ruce Guenter's un­trou­bled qmail+­patch­es RPM set, which was good, but he seems to have aban­doned them.

In the last year or so, I have kept work­ing on them, and now they are some­what more heav­i­ly patched.

I have added:

  • quo­­ta (bounce over-quo­­ta im­me­di­ate­­ly)

  • re­al­r­cp­t­­to (bounce im­me­di­ate­­ly un­ex­is­­tant ad­­dress­es)

  • tarpit­t­ing (add de­lays over n re­­cip­i­ents)

  • er­rno patch (to make it build on RH 9 or lat­er)

  • smtp au­th+tls (well, smtp auth and TLS ;-)

And mis­ce­la­neous changes to the de­fault con­fig so that, for ex­am­ple smtp­suth sim­ply works by de­fault.

I think this is prob­a­bly the eas­i­est way to in­stall a tra­di­tion­al mul­ti­-UID qmail on Red Hat-­like sys­tem­s.

It has been a lit­tle (not too much) work, be­cause when you pile patch over patch over patch, usu­al­ly the third one does­n't ap­ply, and this patch­set has 22 patch­es in it.

But... the qmail source is pret­ty clean for C!

I think I am go­ing to put it on or some­such.

Late congress report

Last week, I gave a con­fer­ence 1 about KDE in the first free soft­ware con­gress of Ar­genti­na.

I can't even re­mem­ber how many "first(what­ev­er)lin­ux" of "first(what­ev­er)free soft­ware(­mum­ble)" events I have at­tend­ed. one of these days, I ex­pect to at­tend a sec­ond, and in a decade or so a third, but it seems orgniz­ing one of these things, even when they work nice­ly, is tir­ing work.

This one was or­ga­nized by Usuar­ia, a non-prof­it for com­put­ing dif­fu­sion 2 , and they had some in­ter­est­ing spon­sors, in­clud­ing Red Hat, Sun, and Mi­cro­soft.

Yes, that Mi­cro­soft.

Sad­ly, I could­n't as­sist the con­fer­ence by the MS ex­ec­u­tive, be­cause I missed about half of the con­gress for work.

My KDE stuff was shown at a small­er room, about 35/40 peo­ple. Since there was very lit­tle time (45 min­utes) and I want­ed to keep some for Q&A, I most­ly showed sim­ple stuff, like DCOP, some of the new app­s, like Quan­ta.

I spoke a lot about rather the philo­soph­i­cal thrust of KDE de­vel­op­men­t, how KDE tends to search for a tech­no­log­i­cal so­lu­tion to the UI prob­lem­s, on the grounds that lat­er, when ev­ery­one is us­ing the API, if the UI changes and the API does­n't ev­ery­one win­s.

Noth­ing spe­cial, re­al­ly, and not one of my best ones, so my ear­li­er nervio­sism was war­rant­ed ;-)

I at­tend­ed some oth­er con­fer­ences, I re­mem­ber one about com­par­ing MTAs (he called Qmail dif­fi­cult, so I did­n't like it much ;-), one about Free Soft­ware eco­nom­ics by a guy from Maas­tricht 3 which was quite good.

An­oth­er one was by a Nov­ell ex­ec­u­tive, who spoke about J2EE and .NET from a free soft­ware per­spec­tive.

Or rather, spoke about J2EE for a while, then men­tioned Mono be­cause he was run­ning out of time ;-)

I met my third KDE de­vel­op­er! 4 Pu­peno was there. Pu­peno: you look like a younger, red­head­ed RM­S. And your pants made me dizzy.

I could­n't tell you that per­son­al­ly. I like them :-)

I could tell this was a Lin­ux even be­cause hlf the peo­ple there had longer hair and/or longer beards than I do, when in reg­u­lar events it's un­like­ly 10% do.

Met a few of the old fel­lows from my LUG in San­ta Fe, one of them seems to en­joy suits now ;-)

But I bet since a few para­graphs above ev­ery­one is still hav­ing the word Mi­cro­soft bounc­ing in his head.

Yes, they were a spon­sor. Fur­ther: they were, by far, the largest one.

I got a Mi­cro­soft pen, a copy of Unix Ser­vices for Unix, a brochure, and a can­vas bag with Mi­crosoft­'s lo­go em­broi­dered.

Said bag is now the bed of my new kit­ten, Nini, which I adopt­ed mon­day (but that's an­oth­er sto­ry).

UP­DATE: Some­one who was there re­mind­ed me that I al­so got a box con­tain­ing a fair­ly nice tukey sand­wich, a brown­ie, and a small bot­tle of co­ca co­la, so, thank you, Mi­crosoft!

And no, I did­n't have to sign any­thing to get the sand­wich, not a NDA, not a li­cense, and no, it was­n't wrapped in a bag say­ing "if you open this bag you agree..."


Is there a less pre­ten­tious word in eng­lish for this? In span­ish I say I give a "char­la" which means a con­ver­sa­tion, a chat. Of course in eng­lish that's not right.


No, I don't know what they do, al­though I gave class­es in their class­rooms for 6 month­s)


Where D'Artag­nan died (if he had ex­ist­ed, of course)


Yes, I have on­ly ev­er met three guys in­volved in KDE de­vel­op­men­t. That makes one ev­ery 1.5 years.

Contents © 2000-2020 Roberto Alsina