hmm, I had read that it was seconds however it is in fact less. I know setting it to 1 is long enough for it to make the connection even under moderate load on our 100mb/cisco lan, and I deleted the mysql source because I'm stressed for disk space on my laptop, when I get a chance I will investigate further, corporate programming has a tendancy to reduce the priority on cleanup once you have it working.
I don't know if its desirable to set that on the other connections, are they for adds/deletes? if so its hardly service impacting for them not to timeout timely. matt btw, I apologise for our little problem a few months back on the qmail list. On Wed, 4 Jun 2003 10:50:29 -0500 Ken Jones <[EMAIL PROTECTED]> wrote: > Done. > > I also added it to the other mysql connect calls (2 others). > > Is the timeout value in seconds? Maybe we should give it > more than 1 second to connect. Perhaps 3? > > Ken Jones > > On Wednesday 04 June 2003 10:01 am, matthew berardi wrote: > > I don't know how many people would desire this behaviour. but I > > think it should be considered. > > > > in vmysql.c I added the following lines to vauth_open_update() > > > > uint timeout = 1; > > mysql_options(&mysql_update, MYSQL_OPT_CONNECT_TIMEOUT, (char*) > > &timeout); > > > > this adds a timeout to the mysql_real_connect method. > > without this libmysqlclient uses the standard connect() to connect > > which, under heavy load, can take minutes to timeout, the effect is > > that if the update server was to become unavailable your pop > > concurency would max out very quickly, effectively a loss of > > service. > > > > also you would want to remove the error lines: > > > > fprintf(stderr, "could not connect to mysql update server %s with > > database\n", mysql_error(&mysql_update)); > > > > and > > > > fprintf(stderr, "could not connect to mysql update server %s\n", > > mysql_error(&mysql_update)); > > > > because some pop clients break if they receive anything other than > > the ok after auth. > > > >