RE: [vchkpw] MySql load causes bounced mail
Jason Wilkinson wrote: Hello all, I've searched and wasn't able to come up with an answer to this question. Though I did see a reference to it in the Bug Lists ( http://tinyurl.com/59gos ). We're hitting a wall with our MySql install and our traffic is filling up all available MySql connections. We are currently working to tune our MySql install. Until that happens, I was wondering if there was a reason that vpopmail bounces all mail with a 5xx response when it can't connect to MySql. I know that I can increase my max_connections in MySql...it just seems as if vpopmail should respond with a 4xx response so that valid mail isn't bounced. I will admit that I am using an old version of vpopmail (5.2). If this has been fixed I'll work towards an upgrade. Thanks in advance, -jw- Can anybody tell me if this issue is being addressed in future releases?
Re: [vchkpw] MySql load causes bounced mail
Jason Wilkinson wrote: Jason Wilkinson wrote: Hello all, I've searched and wasn't able to come up with an answer to this question. Though I did see a reference to it in the Bug Lists ( http://tinyurl.com/59gos ). We're hitting a wall with our MySql install and our traffic is filling up all available MySql connections. We are currently working to tune our MySql install. Until that happens, I was wondering if there was a reason that vpopmail bounces all mail with a 5xx response when it can't connect to MySql. I know that I can increase my max_connections in MySql...it just seems as if vpopmail should respond with a 4xx response so that valid mail isn't bounced. I will admit that I am using an old version of vpopmail (5.2). If this has been fixed I'll work towards an upgrade. Thanks in advance, -jw- Can anybody tell me if this issue is being addressed in future releases? I think, it is being addressed and will be incorporated in a future version. I think, as of today, you can only try spreading the load amongst more servers, via mysql-replication. It doesn't protect from spikes to one particular server, though. Rainer -- === ~ Rainer Duffner - [EMAIL PROTECTED] ~ ~ Freising - Munich - Germany ~ ~Unix - Linux - BSD - OpenSource - Security ~ ~ http://www.ultra-secure.de/~rainer/pubkey.pgp ~ ===
Re: [vchkpw] MySql load causes bounced mail
On Nov 17, 2004, at 4:33 PM, Rick Macdougall wrote: Speaking of which, Tom I do have a patch to correct courier-imap's authvckpw to work with the new webmail, no_imap code. Should I submit that to the dev list and we can include it in the contrib directory, binc imap really didn't work out for us. See if you can push it through to MrSam for inclusion in a future Courier-IMAP release. If you'd like, you can send it to me first and I'll take a look at it. I know that Michael Bowe has worked on the vpopmail code in Courier-IMAP before, I'm not sure how he got changes pushed into the main distribution. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] MySql load causes bounced mail
Tom Collins wrote: On Nov 17, 2004, at 4:33 PM, Rick Macdougall wrote: Speaking of which, Tom I do have a patch to correct courier-imap's authvckpw to work with the new webmail, no_imap code. Should I submit that to the dev list and we can include it in the contrib directory, binc imap really didn't work out for us. See if you can push it through to MrSam for inclusion in a future Courier-IMAP release. If you'd like, you can send it to me first and I'll take a look at it. I know that Michael Bowe has worked on the vpopmail code in Courier-IMAP before, I'm not sure how he got changes pushed into the main distribution. Hi, It's basically your new code in vchkpw.c placed into the preauthvchkpw.c of courier-imap. I'll do up a diff in the morning and send it to the devel list. Regards, Rick
Re: [vchkpw] MySql load causes bounced mail
At 25/10/2004 25/10/2004 -0400, you wrote: I feel it could be time to redesign qmail and use atexit() functions. This could be a lengthy process. But if you are willing to undertake it, and write the patches for it, then it is certainly worth it. I'm willing to do it, but I've no time shortly. Anyway, I feel most urgent job would be to rewrite Makefile and make a ./configure script. Tonino X-Istence [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] MySql load causes bounced mail
At 22/10/2004 22/10/2004 -0400, you wrote: On Oct 22, 2004, at 8:13 AM, tonix (Antonio Nati) wrote: Any comment? Tonino Why is qMail calling _exit() and not exit()? Is there a reason it does not want its files closed, and other stuff properly cleaned up? Or is it because DJB is just not happy with using calls that are in the libc library and thus are not thread safe for the most part? Threads? I don't see where qmail is using threads... Anyways, eventhough i do not agree with using #define's to override a function, i don't see it as a bad one necessarily, as it clears up the entire MySQL mess. Funny, I'm checking my (chkuser) patch and I see also auth patch (Bill Shupp's toaster version) does the same thing (overriding _exit). I feel it could be time to redesign qmail and use atexit() functions. Tonino [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] MySql load causes bounced mail
On Oct 25, 2004, at 4:08 PM, tonix (Antonio Nati) wrote: At 22/10/2004 22/10/2004 -0400, you wrote: On Oct 22, 2004, at 8:13 AM, tonix (Antonio Nati) wrote: Any comment? Tonino Why is qMail calling _exit() and not exit()? Is there a reason it does not want its files closed, and other stuff properly cleaned up? Or is it because DJB is just not happy with using calls that are in the libc library and thus are not thread safe for the most part? Threads? I don't see where qmail is using threads... I know, i was just pointing out a useless fact i picked up while reading a book. Anyways, eventhough i do not agree with using #define's to override a function, i don't see it as a bad one necessarily, as it clears up the entire MySQL mess. Funny, I'm checking my (chkuser) patch and I see also auth patch (Bill Shupp's toaster version) does the same thing (overriding _exit). I feel it could be time to redesign qmail and use atexit() functions. This could be a lengthy process. But if you are willing to undertake it, and write the patches for it, then it is certainly worth it. Tonino X-Istence
Re: [vchkpw] MySql load causes bounced mail
At 21/10/2004 21/10/2004 -0700, you wrote: vdelivermail calls _exit() when running a command in a .qmail file (exit codes 99, 100 and 111). It should really be calling vexit() to give the MySQL lib a chance to close its connections. We could also consider just using atexit() to register functions that will be automatically called at exit, then we don't have to worry about calling vexit instead (which calls vclose). I'm working on the chkuser side, and this is my solution (here semplified)... Given the fact qmail-smtpd uses only _exit(), and this function is called a lot of times within the source, I'm substituting this _exit() function within qmail-smtpd.c using these definitions: void my_cleaning_call(int a); #define _exit(a) my_cleaning_call(a) Then in my chkuser.c module, I have: #undef _exit void my_cleaning_call (int a) { vclose(); _exit (a); } Any comment? Tonino -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/ [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] MySql load causes bounced mail
On Oct 22, 2004, at 8:13 AM, tonix (Antonio Nati) wrote: Any comment? Tonino Why is qMail calling _exit() and not exit()? Is there a reason it does not want its files closed, and other stuff properly cleaned up? Or is it because DJB is just not happy with using calls that are in the libc library and thus are not thread safe for the most part? Anyways, eventhough i do not agree with using #define's to override a function, i don't see it as a bad one necessarily, as it clears up the entire MySQL mess. X-Istence
Re: [vchkpw] MySql load causes bounced mail
On Oct 21, 2004, at 11:17 AM, Jason Wilkinson wrote: We're hitting a wall with our MySql install and our traffic is filling up all available MySql connections. I think I see one possible problem. vdelivermail calls _exit() when running a command in a .qmail file (exit codes 99, 100 and 111). It should really be calling vexit() to give the MySQL lib a chance to close its connections. We could also consider just using atexit() to register functions that will be automatically called at exit, then we don't have to worry about calling vexit instead (which calls vclose). I took a quick look at vchkpw, and it appears to close its database connections, but I can't be sure. Is it possible to have MySQL report which processes/programs opened connections but failed to close them? I know that I can increase my max_connections in MySql...it just seems as if vpopmail should respond with a 4xx response so that valid mail isn't bounced. I know that Tonio has worked on a new chkuser patch that, along with some extra code in vpopmail, will respond with 4xx. Is there a chance that the old chkusr patch had an execution path that resulted in it not closing its connection to MySQL? -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] MySql load causes bounced mail
At 21/10/2004 21/10/2004 -0700, you wrote: We could also consider just using atexit() to register functions that will be automatically called at exit, then we don't have to worry about calling vexit instead (which calls vclose). Wow! In another thread I just suggested to use atexit() in vpopmail. I know that Tonio has worked on a new chkuser patch that, along with some extra code in vpopmail, will respond with 4xx. Is there a chance that the old chkusr patch had an execution path that resulted in it not closing its connection to MySQL? Yes, both for new and for old patch. chkuser cannot close any connection, as it's called only for each sender or rcpt, and cannot know when it has finished his job. But, as we are speaking of atexit(), I'll give the good example ( :-) ) and in next 2.0.7 version I'll use it to call vclose(). Thanks, Tonino -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/ [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] MySql load causes bounced mail
On Oct 21, 2004, at 3:09 PM, Tom Collins wrote: vdelivermail calls _exit() when running a command in a .qmail file (exit codes 99, 100 and 111). It should really be calling vexit() to give the MySQL lib a chance to close its connections. According to my book here, calling _exit() does not run any atexit() registered functions. This is also the only reason it is async safe, and thus also safe to use when you are in a signal handler. Whereas exit() does call the atexit() registered functions, and thus is not async safe. X-Istence
Re: [vchkpw] MySql load causes bounced mail
At 21/10/2004 21/10/2004 +0100, you wrote: But, as we are speaking of atexit(), I'll give the good example ( :-) ) and in next 2.0.7 version I'll use it to call vclose(). As another thread is saying, qmail-smtpd also is using _exit(), so atexit() is useless. I'll put another solution to work. Probably I'll change the flush() functions. Tonino -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/ [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED] [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]