dbbalancer-users Mailing List for DBBalancer
Status: Alpha
Brought to you by:
xperience
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(25) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
(1) |
Nov
(6) |
Dec
(2) |
2003 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Dushyanth H. <dus...@di...> - 2004-05-19 13:16:16
|
Hi, Line 3398 in the configure script. ace_lib is defined like below.. ace_lib="-L$ACE_BASE/ace_ -lACE" ^ Note the underscore, when i run make it fails due to this. I fixed by removing the underscore.. ace_lib="-L$ACE_BASE/ace -lACE" regards dushyanth |
From: Dushyanth H. <dus...@di...> - 2004-05-19 13:07:01
|
Hi Andrew, On Wednesday 19 May 2004 08:25, Andrew McMillan wrote: > On Tue, 2004-05-18 at 22:22 +0530, Dushyanth Harinath wrote: > > Hi guys, > > > > Iam getting this error below when i try to connect through the dbbalancer > > writer daemon. > > I think this might be the authentication problem I fixed in CVS. You > may want to try the latest CVS, which is able to fallback if the > connection attempt uses the latest protocol. Iam still getting the same error with the cvs version too. Iam attaching the debug msgs with this email. Iam getting the below errors when running make with both 0.4.4 and cvs version. But it successfully compiles the dbbalncerd binary. I guess the tests are failing to compile for some reason..Has this anything to do with the problem that I have with the writer daemon.. make[3]: Entering directory `/usr/local/src/new/dbbalancer/src/tests/postgres_cc' g++ -g -Wall -I/usr/local/pgsql/include -o pgtest pgtest.cc -L/usr/local/pgsql/lib -lpq++ -lcrypt In file included from /usr/local/pgsql/include/libpq++.h:30, from pgtest.cc:3: /usr/local/pgsql/include/libpq++/pgconnection.h:49: syntax error before `{' /usr/local/pgsql/include/libpq++/pgconnection.h:55: parse error before `public' /usr/local/pgsql/include/libpq++/pgconnection.h:57: destructors must be member functions /usr/local/pgsql/include/libpq++/pgconnection.h:57: virtual outside class declaration /usr/local/pgsql/include/libpq++/pgconnection.h:60: non-member function `Status ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgconnection.h:61: non-member function `ConnectionBad ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgconnection.h:62: non-member function `ErrorMessage ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgconnection.h:65: non-member function `DBName ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgconnection.h:76: parse error before `protected' /usr/local/pgsql/include/libpq++/pgconnection.h:79: syntax error before `(' /usr/local/pgsql/include/libpq++/pgconnection.h:81: ISO C++ forbids declaration of `PgConnection' with no type /usr/local/pgsql/include/libpq++/pgconnection.h:81: new declaration `int PgConnection ()' /usr/local/pgsql/include/libpq++/pgconnection.h:57: ambiguates old declaration `void PgConnection ()' /usr/local/pgsql/include/libpq++/pgconnection.h:83: parse error before `private' /usr/local/pgsql/include/libpq++/pgconnection.h:87: syntax error before `&' In file included from /usr/local/pgsql/include/libpq++.h:31, from pgtest.cc:3: /usr/local/pgsql/include/libpq++/pgdatabase.h:37: syntax error before `:' /usr/local/pgsql/include/libpq++/pgdatabase.h:45: destructors must be member functions /usr/local/pgsql/include/libpq++/pgdatabase.h:51: non-member function `Tuples ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:52: non-member function `CmdTuples ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:54: non-member function `FieldName (int)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:55: non-member function `FieldNum (const char *)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:56: non-member function `FieldType (int)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:57: non-member function `FieldType (const char *)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:58: non-member function `FieldSize (int)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:59: non-member function `FieldSize (const char *)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:60: non-member function `GetValue (int, int)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:61: non-member function `GetValue (int, const char *)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:62: non-member function `GetIsNull (int, int)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:63: non-member function `GetIsNull (int, const char *)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:64: non-member function `GetLength (int, int)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:65: non-member function `GetLength (int, const char *)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:69: non-member function `DisplayTuples (FILE *, bool, const char *, bool, bool)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:71: non-member function `PrintTuples (FILE *, bool, bool, bool)' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:76: non-member function `OidStatus ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgdatabase.h:79: parse error before `protected' /usr/local/pgsql/include/libpq++/pgdatabase.h:88: syntax error before `&' In file included from /usr/local/pgsql/include/libpq++.h:32, from pgtest.cc:3: /usr/local/pgsql/include/libpq++/pglobject.h:38: syntax error before `:' /usr/local/pgsql/include/libpq++/pglobject.h:43: syntax error before `;' /usr/local/pgsql/include/libpq++/pglobject.h:46: parse error before `public' /usr/local/pgsql/include/libpq++/pglobject.h:48: ISO C++ forbids declaration of `PgLargeObject' with no type /usr/local/pgsql/include/libpq++/pglobject.h:48: only declarations of constructors can be `explicit' /usr/local/pgsql/include/libpq++/pglobject.h:49: destructors must be member functions /usr/local/pgsql/include/libpq++/pglobject.h:57: non-member function `Tell ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pglobject.h:62: syntax error before `(' /usr/local/pgsql/include/libpq++/pglobject.h:68: syntax error before `&' In file included from /usr/local/pgsql/include/libpq++.h:33, from pgtest.cc:3: /usr/local/pgsql/include/libpq++/pgtransdb.h:38: syntax error before `:' /usr/local/pgsql/include/libpq++/pgtransdb.h:44: destructors must be member functions /usr/local/pgsql/include/libpq++/pgtransdb.h:49: parse error before `protected' /usr/local/pgsql/include/libpq++/pgtransdb.h:59: parse error before `&' /usr/local/pgsql/include/libpq++/pgtransdb.h:59: ISO C++ forbids declaration of `PgTransaction' with no type /usr/local/pgsql/include/libpq++/pgtransdb.h:60: syntax error before `&' In file included from /usr/local/pgsql/include/libpq++.h:34, from pgtest.cc:3: /usr/local/pgsql/include/libpq++/pgcursordb.h:44: syntax error before `:' /usr/local/pgsql/include/libpq++/pgcursordb.h:50: destructors must be member functions /usr/local/pgsql/include/libpq++/pgcursordb.h:53: `string' was not declared in this scope /usr/local/pgsql/include/libpq++/pgcursordb.h:53: parse error before `,' /usr/local/pgsql/include/libpq++/pgcursordb.h:56: new declaration `int Close ()' /usr/local/pgsql/include/libpq++/pglobject.h:53: ambiguates old declaration `void Close ()' /usr/local/pgsql/include/libpq++/pgcursordb.h:60: non-member function `Cursor ()' cannot have `const' method qualifier /usr/local/pgsql/include/libpq++/pgcursordb.h: In function `const char *Cursor ()': /usr/local/pgsql/include/libpq++/pgcursordb.h:61: `pgCursor' undeclared (first use this function) /usr/local/pgsql/include/libpq++/pgcursordb.h:61: (Each undeclared identifier is reported only once for each function it appears in.) /usr/local/pgsql/include/libpq++/pgcursordb.h: At top level: /usr/local/pgsql/include/libpq++/pgcursordb.h:65: `string' was not declared in this scope /usr/local/pgsql/include/libpq++/pgcursordb.h:65: parse error before `)' /usr/local/pgsql/include/libpq++/pgcursordb.h: In function `void Cursor (...)': /usr/local/pgsql/include/libpq++/pgcursordb.h:67: `cursor' undeclared (first use this function) /usr/local/pgsql/include/libpq++/pgcursordb.h: At top level: /usr/local/pgsql/include/libpq++/pgcursordb.h:70: parse error before `protected' /usr/local/pgsql/include/libpq++/pgcursordb.h:85: syntax error before `&' pgtest.cc: In function `int main (int, char **)': pgtest.cc:10: `string' undeclared (first use this function) pgtest.cc:10: parse error before `;' pgtest.cc:26: `query' undeclared (first use this function) pgtest.cc:35: `atoi' undeclared (first use this function) pgtest.cc:53: `db' undeclared (first use this function) pgtest.cc:58: parse error before `(' pgtest.cc:91: duplicate case value `PGRES_COMMAND_OK' pgtest.cc:72: previously used here make[3]: *** [pgtest] Error 1 Wat else could i try to solve this error.. DBPostgresFrontend: Message to FrontEnd: DBBalancer: DBBalancer (replication mode) sync error: Received a unexpected response command from the backends. Please check the attached debug messages.. regards dushyanth |
From: Andrew M. <an...@ca...> - 2004-05-19 02:55:53
|
On Tue, 2004-05-18 at 22:22 +0530, Dushyanth Harinath wrote: > Hi guys, > > Iam getting this error below when i try to connect through the dbbalancer > writer daemon. I think this might be the authentication problem I fixed in CVS. You may want to try the latest CVS, which is able to fallback if the connection attempt uses the latest protocol. Cheers, Andrew. > > Warning: pg_connect() unable to connect to PostgreSQL server: DBBalancer: > DBBalancer (replication mode) sync error: Received a unexpected response > command from the backends in /var/www/html/insert.php on line 12 > Could not connect to db. > > I started dbbalancerd like below.. > > # ./dbbalancerd -w -d -f etc/LoadBalancerExample.conf > > The error msg i get in the console when i call insert.php is below.. > > (2051, 21:56:26.320700) (01) 2 descriptors modified. > (2051, 21:56:26.320840) Data in BE socket (number :01:0). > (2051, 21:56:26.320993) Received 79 bytes from BE socket. > (2051, 21:56:26.321123) Data in BE socket (number :01:1). > (2051, 21:56:26.321259) Received 79 bytes from BE socket. > ***checkAndSendData(18) > (2051, 21:56:26.321561) getBEBuffersFirstCharacter() > (2051, 21:56:26.321681) Content of buffer 1 > HEXDUMP 79 bytes > 43 42 45 47 49 4e 00 50 62 6c 61 6e 6b 00 54 00 CBEGIN.Pblank.T. > 01 67 65 74 64 61 74 61 62 61 73 65 65 6e 63 6f .getdatabaseenco > 64 69 6e 67 00 00 00 00 13 00 40 ff ff ff ff 44 ding......@....D > 80 00 00 00 0d 53 51 4c 5f 41 53 43 49 49 43 53 .....SQL_ASCIICS > 45 4c 45 43 54 00 43 43 4f 4d 4d 49 54 00 5a (2051, 21:56:26.322105) The > returned command was (C) > (2051, 21:56:26.322231) Received an unexpected response command from the > backends (C) > (2051) DBPostgresFrontend: Message to FrontEnd: DBBalancer: DBBalancer > (replication mode) sync error: Received a unexpected response command from > the backends > HEXDUMP 114 bytes > 45 20 44 42 42 61 6c 61 6e 63 65 72 3a 20 44 42 E DBBalancer: DB > 42 61 6c 61 6e 63 65 72 20 28 72 65 70 6c 69 63 Balancer (replic > 61 74 69 6f 6e 20 6d 6f 64 65 29 20 73 79 6e 63 ation mode) sync > 20 65 72 72 6f 72 3a 20 20 52 65 63 65 69 76 65 error: Receive > 64 20 61 20 75 6e 65 78 70 65 63 74 65 64 20 72 d a unexpected r > 65 73 70 6f 6e 73 65 20 63 6f 6d 6d 61 6e 64 20 esponse command > 66 72 6f 6d 20 74 68 65 20 62 61 63 6b 65 6e 64 from the backend > 73 00 (2051, 21:56:26.323291) DBPostgresWriterConnection: Received a > unexpected response command from the backends > ************** handleConnectionLoop (it: 50) ************* > (1026 21:56:26.738618) DBThreadPool::reviewThreads. Current: 10, Queue: 0, > Calm Rounds: 10. > (1026 21:56:26.738864) DBPool::getConnectionForTest(): Lets see if pool 02, > Conn 0... > (1026) Connection 02 is going to be tested!!. > > > In line 12, I have the below connect functon.. > > $con=pg_connect("host=192.168.0.69 port=5443 dbname=test user=test > password=qwedsa") or die ("Could not connect to db"); > > I get this error when i try to connect from psql too.. > > # psql -h 192.168.0.69 -p 5443 -U test -d test > Password: > psql: DBBalancer: DBBalancer (replication mode) sync error: Received a > unexpected response command from the backends > > The same credentials works for the reader daemon and iam able to run select > queries through it.. > > The dbbalancer conf file is below.. > > --------------- > daemon.reader-port=5442 > daemon.writer-port=5443 > daemon.host=master > > daemon.init-threads=10 > daemon.min-threads=10 > daemon.max-threads=30 > daemon.init-db-connections=5 > daemon.min-db-connections=5 > daemon.max-db-connections=15 > daemon.reaper-delay=1 > daemon.user=test > daemon.password=qwedsa > daemon.dbname=test > daemon.auth-method=password > daemon.log-file=stderr > > machine.host=rs1 > machine.dbname=test > machine.port=5432 > machine.dbuser=test > machine.dbpassword=qwedsa > > machine.host=rs2 > machine.dbname=test > machine.port=5432 > machine.dbuser=test > machine.dbpassword=qwedsa > --------- > > Password authentication is set on all the backend db's and the versions are > > Redhat 7.3 > Postgres 7.3.6. > Ace 5.1.14 > libpq++-4.0. > > How do i get the writer daemon working. Any suggestions ? > > tia > dushyanth > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > _______________________________________________ > Dbbalancer-users mailing list > Dbb...@li... > https://lists.sourceforge.net/lists/listinfo/dbbalancer-users ------------------------------------------------------------------------- Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 The world isn't worse - the news coverage is better. ------------------------------------------------------------------------- |
From: Dushyanth H. <dus...@di...> - 2004-05-18 16:53:02
|
Hi guys, Iam getting this error below when i try to connect through the dbbalancer writer daemon. Warning: pg_connect() unable to connect to PostgreSQL server: DBBalancer: DBBalancer (replication mode) sync error: Received a unexpected response command from the backends in /var/www/html/insert.php on line 12 Could not connect to db. I started dbbalancerd like below.. # ./dbbalancerd -w -d -f etc/LoadBalancerExample.conf The error msg i get in the console when i call insert.php is below.. (2051, 21:56:26.320700) (01) 2 descriptors modified. (2051, 21:56:26.320840) Data in BE socket (number :01:0). (2051, 21:56:26.320993) Received 79 bytes from BE socket. (2051, 21:56:26.321123) Data in BE socket (number :01:1). (2051, 21:56:26.321259) Received 79 bytes from BE socket. ***checkAndSendData(18) (2051, 21:56:26.321561) getBEBuffersFirstCharacter() (2051, 21:56:26.321681) Content of buffer 1 HEXDUMP 79 bytes 43 42 45 47 49 4e 00 50 62 6c 61 6e 6b 00 54 00 CBEGIN.Pblank.T. 01 67 65 74 64 61 74 61 62 61 73 65 65 6e 63 6f .getdatabaseenco 64 69 6e 67 00 00 00 00 13 00 40 ff ff ff ff 44 ding......@....D 80 00 00 00 0d 53 51 4c 5f 41 53 43 49 49 43 53 .....SQL_ASCIICS 45 4c 45 43 54 00 43 43 4f 4d 4d 49 54 00 5a (2051, 21:56:26.322105) The returned command was (C) (2051, 21:56:26.322231) Received an unexpected response command from the backends (C) (2051) DBPostgresFrontend: Message to FrontEnd: DBBalancer: DBBalancer (replication mode) sync error: Received a unexpected response command from the backends HEXDUMP 114 bytes 45 20 44 42 42 61 6c 61 6e 63 65 72 3a 20 44 42 E DBBalancer: DB 42 61 6c 61 6e 63 65 72 20 28 72 65 70 6c 69 63 Balancer (replic 61 74 69 6f 6e 20 6d 6f 64 65 29 20 73 79 6e 63 ation mode) sync 20 65 72 72 6f 72 3a 20 20 52 65 63 65 69 76 65 error: Receive 64 20 61 20 75 6e 65 78 70 65 63 74 65 64 20 72 d a unexpected r 65 73 70 6f 6e 73 65 20 63 6f 6d 6d 61 6e 64 20 esponse command 66 72 6f 6d 20 74 68 65 20 62 61 63 6b 65 6e 64 from the backend 73 00 (2051, 21:56:26.323291) DBPostgresWriterConnection: Received a unexpected response command from the backends ************** handleConnectionLoop (it: 50) ************* (1026 21:56:26.738618) DBThreadPool::reviewThreads. Current: 10, Queue: 0, Calm Rounds: 10. (1026 21:56:26.738864) DBPool::getConnectionForTest(): Lets see if pool 02, Conn 0... (1026) Connection 02 is going to be tested!!. In line 12, I have the below connect functon.. $con=pg_connect("host=192.168.0.69 port=5443 dbname=test user=test password=qwedsa") or die ("Could not connect to db"); I get this error when i try to connect from psql too.. # psql -h 192.168.0.69 -p 5443 -U test -d test Password: psql: DBBalancer: DBBalancer (replication mode) sync error: Received a unexpected response command from the backends The same credentials works for the reader daemon and iam able to run select queries through it.. The dbbalancer conf file is below.. --------------- daemon.reader-port=5442 daemon.writer-port=5443 daemon.host=master daemon.init-threads=10 daemon.min-threads=10 daemon.max-threads=30 daemon.init-db-connections=5 daemon.min-db-connections=5 daemon.max-db-connections=15 daemon.reaper-delay=1 daemon.user=test daemon.password=qwedsa daemon.dbname=test daemon.auth-method=password daemon.log-file=stderr machine.host=rs1 machine.dbname=test machine.port=5432 machine.dbuser=test machine.dbpassword=qwedsa machine.host=rs2 machine.dbname=test machine.port=5432 machine.dbuser=test machine.dbpassword=qwedsa --------- Password authentication is set on all the backend db's and the versions are Redhat 7.3 Postgres 7.3.6. Ace 5.1.14 libpq++-4.0. How do i get the writer daemon working. Any suggestions ? tia dushyanth |
From: Daniel V. S. <dv...@ar...> - 2003-12-12 20:10:13
|
Hello. I've tried dbbalancer with PostgreSQL 74 and it seems to work OK. Alexander, can you run DBBalancer in debug mode (use -d) and send me the output file. Maybe I can see what's wrong. Regards Daniel. On Martes, 9 de Diciembre de 2003 12:19, Alexander Goldybin wrote: > Hello Daniel, > > > I'm afraid that changes in PosgreSQL protocol need updates in DBBalancer. > > DBBalancer doesn't use Postgres libraries because it need > > low-level access to > > the data transmitted, in order to be able to intercept and re-route > > connections. > > > > That said, I'll try to install Pg74 and see if I can easily spot > > the changes > > to update DBBalancer accordingly. -- ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Daniel V. S. <dv...@ar...> - 2003-12-05 20:10:26
|
Hello. First, thank you for using DBBalancer. I'm afraid that changes in PosgreSQL protocol need updates in DBBalancer. DBBalancer doesn't use Postgres libraries because it need low-level access to the data transmitted, in order to be able to intercept and re-route connections. That said, I'll try to install Pg74 and see if I can easily spot the changes to update DBBalancer accordingly. Regards Daniel. > > I believe that PostgreSQL 7.4 uses a new wire protocol. I have not > built dbbalancer against a PostgreSQL 7.4 version, I believe. > > I can try and build it for you and see if that helps... > > Cheers, -- ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Andrew M. <an...@ca...> - 2003-12-05 07:51:01
|
On Thu, 2003-12-04 at 04:46, Alexander Goldybin wrote: > =EF=BB=BF=20 > Hi Daniel, > =20 > first of all, thank you very much for this wonderful peace of software > !!! > Now about our problem - we have tried to integrate DBBalancer, > everything is fine, the balancer and replicator can be started, > connects themselves to the databases located on 2 different servers, > simply great, BUT we can not connect neither to balancer nor to > replicator at all :(... I believe that PostgreSQL 7.4 uses a new wire protocol. I have not built dbbalancer against a PostgreSQL 7.4 version, I believe. I can try and build it for you and see if that helps... Cheers, Andrew. > =20 > We have the following system: > =20 > Debian 3 (2.4.22 kernel) > PostgreSQL 7.4 > DBBalancer 0.4.4 - fetched per apt-get, because of compiling troubles > connect through PHP4 and psql > =20 > Now to our dbbalancer.conf -=20 > ------ > daemon.user =3D balancer > daemon.host =3D <IP> (we have tried localhost too, with the same > "success") > daemon.auth-method =3D trust (password was tried too) > =20 > 2 machines with successful connects > ------- > =20 > Now our debug log if we trying to connect to user "balancer" on the > reader port (in our case 5442): > =20 > =20 > (32771, 16:39:44.736893) (01::01) Handling connection. > (32771, 16:39:44.736960) Processing new conection. Receiving > login data. (socket: 28) > (32771, 16:39:44.737045) Starting client connection process. > (32771) Error reading startup packet: Success > (32771, 16:39:44.737228) Login process failed. > (32771, 16:39:44.737296) DBPostgresPooledConnection: Login > process failed. > =20 > =20 > psql says:=20 > =20 > psql: server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > =20 > =20 > in the postgresql.conf we can find the following: > =20 > LOG: unexpected EOF on client connection > =20 > =20 > :( So what could it be ? The replicator/balancer itself can connect to > all databases perfectly, but no connects to balancer in any case :( > ... This is the PostgreSQL sub process dying, from the look of things. I'm sure the PostgreSQL folks would like to see a backtrace of that, if that's the case - any chance of building PostgreSQL with debugging enabled? Or is that DBBalancer dying? Cheers, Andrew. =20 > Thank you very much in advance !!! This topic is really important for > us, I would be very grateful if you could answer to this email as soon > as possible. Thank you !! > =20 > =20 > Kind regards, > Alexander Goldybin > =20 ------------------------------------------------------------------------- Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 The truth is rarely pure, and never simple. - Oscar Wilde ------------------------------------------------------------------------- |
From: Alexander G. <xe...@fr...> - 2003-12-03 15:48:00
|
Hi Daniel, first of all, thank you very much for this wonderful peace of software = !!! Now about our problem - we have tried to integrate DBBalancer, = everything is fine, the balancer and replicator can be started, connects = themselves to the databases located on 2 different servers, simply = great, BUT we can not connect neither to balancer nor to replicator at = all :(... We have the following system: Debian 3 (2.4.22 kernel) PostgreSQL 7.4 DBBalancer 0.4.4 - fetched per apt-get, because of compiling troubles connect through PHP4 and psql Now to our dbbalancer.conf -=20 ------ daemon.user =3D balancer daemon.host =3D <IP> (we have tried localhost too, with the same = "success") daemon.auth-method =3D trust (password was tried too) 2 machines with successful connects ------- Now our debug log if we trying to connect to user "balancer" on the = reader port (in our case 5442): (32771, 16:39:44.736893) (01::01) Handling connection. (32771, 16:39:44.736960) Processing new conection. Receiving login data. = (socket: 28) (32771, 16:39:44.737045) Starting client connection process. (32771) Error reading startup packet: Success (32771, 16:39:44.737228) Login process failed. (32771, 16:39:44.737296) DBPostgresPooledConnection: Login process = failed. psql says:=20 psql: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. in the postgresql.conf we can find the following: LOG: unexpected EOF on client connection :( So what could it be ? The replicator/balancer itself can connect to = all databases perfectly, but no connects to balancer in any case :( ... Thank you very much in advance !!! This topic is really important for = us, I would be very grateful if you could answer to this email as soon = as possible. Thank you !! Kind regards, Alexander Goldybin |
From: Daniel V. S. <dv...@ar...> - 2003-03-25 19:52:01
|
Hello Sam. I would be very grateful if you could send me the patches against latest DBBalancer version. I will include them in a new release, if you want. There is a mailing list, dbb...@li..., where we could talk about any changes or improvements. Regards. Daniel. On Martes, 25 de Marzo de 2003 10:23, HS Wang wrote: > Hi there, for the past month I've been working on revamping and adding > features to the DB Balancer. As of now I have some failover/redundancy/hot > swapping capabilities. I want to share this software on sourceforge under > your project...how can I get in touch with you to discuss this? > > Thanks. > btw, my name is Sam. -- ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Daniel V. S. <dv...@ar...> - 2003-03-25 19:51:55
|
Hello Frank. Postgres libraries are not mandatory to build DBBalancer, since DBBalancer uses the Postgres protocol at a low level (with the danger of being outdated by protocol changes, of course...), and handles it by itself. This is so because only a very small part of the protocol needs to be used, actually opening and closing of the connections, only. So, what is stopping "configure" is the lack of libACE, not the lack of libpq or libpq++, which will only prevent the building of a couple of test programs. Anyway, a "--with-pq=/usr/local/pgsql" should help with the libpq error.... I would like to hear about the outcome of any study or test you do with DBBalancer, since I could use that to improve it. Regards Daniel. PS: Yes, compiling ACE takes a LOOOOOONG time, specially with gcc3. But it is a very nice C++ library and it helped a lot in the development of DBBalancer... Maybe you can be a binary. I think that there are ".deb"s and maybe you can extract the binaries from there, even for your RedHat (tip: use "ar x ...") On Martes, 25 de Marzo de 2003 14:31, you wrote: > Hello. > > We have a subject at school to load balance 2 PostgreSQL servers. We have > choosen your program to use for load balance. We have only 2 problems. If > we run ./configure in dir /DBBalance then the following error occurerd. .... > checking for select... no > checking for socket... yes > checking for main in -lpq... no > libpq.so wasn't found. If it's installed in your system please use > --with-pq parameter to specify the base directory of the installation. > checking for main in -lpq++... no > libpq++.so wasn't found. If it's installed in your system please use > --with-pq++ parameter to specify the base directory of the installation. > checking for libACE... no > libACE.so wasn't found. If it's installed in your system please use > --with-ACE parameter to specify the base directory of the installation. > > The ./configure tool cannot find the files libpq.so and libpq++.so. The > libpq.so is installed in the dir /usr/local/pgsql/lib. How can we fix this > problem? I can install the ACE library, at this moment this library is not > installed because we want that the ./configure tool find first the > libpq.so. To compile ACE it's take al long time and we work on a slow > machine. Linux Redhat 8.0 is just reinstalled. PostgreSQL is just installed > from a source from www.postgresql.org. It's just all "fresh". > > Please can you help me?? > > Kind regards > > Frank Boelens > Hanzehooge school > The Netherlands. -- ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Andrew M. <an...@ca...> - 2002-12-21 21:25:34
|
On Sun, 2002-12-22 at 03:57, Ricardo wrote: > Hi Dear Andrew, > > My name is Ricardo Greco, I am brazilian and I'm a beginner in PHP. > > I have a single question about using PHP with dbBalancer . > > Any suggestion will be hardly appreciated ! > > Well, > > I have a Red Hat 7.3 (kernel 2.4.18) Linux Box running the latest > versions of Apache, PHP and PostgreSQL. > > In order to get benefits of connection pooling, I read some about > dbBalancer, but I think its documentation is very resumed. > > I wish to know the following : > > After installing dbBalancerDaemon (binary), what is needed in my PHP > code to invoke PostgreSQL Access through this proxy (dbBalancer) ? > > Other question : Is it possible a combination with ADOdb and > dbBalancer ? You need to either: (a) run PostgreSQL on a non-standard port, and have dbbalancer connect to that port and serve PostgreSQL on the standard port I.e. 5432). or (b) run PostgreSQL on it's standard port, and have DBBalancer connect to it on that port and serve on a different port. Then in your PHP code you connect to the different port: $db_connection = pg_connect("dbname=mydb user=general port=5442"); which is the way I tend to do it. I choose the second option because I usually have multiple databases running on the same system, and DBBalancer can only serve up one database on any given port, so you end up doing it on a non-standard port for your second database anyway. Hope this helps, Andrew. > > Thanks in advance ! > > Ricardo Greco > Recife-PE Brazil > rg...@no... > > > -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ --------------------------------------------------------------------- |
From: Daniel V. S. <dv...@ar...> - 2002-12-01 15:37:27
|
Hello Graziella. I will try to help you. The messages you're sending don't "neccesarily" imply that an error is=20 happening. They may be saying just than a database is slower than other=20 (because of a slower machine, slower connection, etc). I would like to kn= ow=20 what are you experieced from the client side (maybe hung connections...?)= . =20 It would also be helpful if you sent me a full debug log (as a compressed= =20 attachment, please). Please be careful since the log may include=20 passwords.... Regards Daniel. On Mi=E9 27 Nov 2002 15:31, Gra...@go... wrote: > Hi, > > I tried to use DBBalancer to replicate between 2 databases, each one on= a > different server. However, when I tried to send a write request to the > DBBalancer daemon from a java program (through JDBC) I got the followin= g > error: > > (2051, 14:06:25.119134) Login data received OK. > (2051, 14:06:25.119170) Max Descriptor 20. > ( 14:06:25.119208,2051) Sending Transaction Command: begin > (2051) DBPostgresBackend: Command to BackEnd: Qbegin; > HEXDUMP 8 bytes > 51 62 65 67 69 6e 3b 00 Qbegin;. > > (2051) DBPostgresBackend: Command to BackEnd: Qbegin; > HEXDUMP 8 bytes > 51 62 65 67 69 6e 3b 00 Qbegin;. > > ************** handleConnectionLoop (it: 1) ************* > (2051, 14:06:25.221996) (04) 1 descriptors modified. > (2051, 14:06:25.222047) Data in FE socket. > (2051, 14:06:25.222087) Received 137 bytes from FE socket. > HEXDUMP 137 bytes > 51 73 65 74 20 64 61 74 65 73 74 79 6c 65 20 74 Qset datestyle t > 6f 20 27 49 53 4f 27 3b 20 73 65 6c 65 63 74 20 o 'ISO'; select > 76 65 72 73 69 6f 6e 28 29 2c 20 63 61 73 65 20 version(), case > 77 68 65 6e 20 70 67 5f 65 6e 63 6f 64 69 6e 67 when pg_encoding > 5f 74 6f 5f 63 68 61 72 28 31 29 20 3d 20 27 53 _to_char(1) =3D 'S > 51 4c 5f 41 53 43 49 49 27 20 74 68 65 6e 20 27 QL_ASCII' then ' > 55 4e 4b 4e 4f 57 4e 27 20 65 6c 73 65 20 67 65 UNKNOWN' else ge > 74 64 61 74 61 62 61 73 65 65 6e 63 6f 64 69 6e tdatabaseencodin > 67 28 29 20 65 6e 64 3b 00 g() end;. > > (2051, 14:06:25.222460) Didn't have data in all Backends (0 / 2). > ************** handleConnectionLoop (it: 2) ************* > (2051, 14:06:25.225652) (04) 1 descriptors modified. > (2051, 14:06:25.225752) Didn't have data in all Backends (1 / 2). > ************** handleConnectionLoop (it: 3) ************* > (2051, 14:06:25.225819) (04) 1 descriptors modified. > (2051, 14:06:25.225857) Didn't have data in all Backends (1 / 2). > ************** handleConnectionLoop (it: 4) ************* > > Could you help please? > > Graziella Vella > Junior Executive (I.T.) > Go Mobile > Malta --=20 ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: <Gra...@go...> - 2002-11-27 14:31:00
|
Hi, I tried to use DBBalancer to replicate between 2 databases, each one on a different server. However, when I tried to send a write request to the DBBalancer daemon from a java program (through JDBC) I got the following error: (2051, 14:06:25.119134) Login data received OK. (2051, 14:06:25.119170) Max Descriptor 20. ( 14:06:25.119208,2051) Sending Transaction Command: begin (2051) DBPostgresBackend: Command to BackEnd: Qbegin; HEXDUMP 8 bytes 51 62 65 67 69 6e 3b 00 Qbegin;. (2051) DBPostgresBackend: Command to BackEnd: Qbegin; HEXDUMP 8 bytes 51 62 65 67 69 6e 3b 00 Qbegin;. ************** handleConnectionLoop (it: 1) ************* (2051, 14:06:25.221996) (04) 1 descriptors modified. (2051, 14:06:25.222047) Data in FE socket. (2051, 14:06:25.222087) Received 137 bytes from FE socket. HEXDUMP 137 bytes 51 73 65 74 20 64 61 74 65 73 74 79 6c 65 20 74 Qset datestyle t 6f 20 27 49 53 4f 27 3b 20 73 65 6c 65 63 74 20 o 'ISO'; select 76 65 72 73 69 6f 6e 28 29 2c 20 63 61 73 65 20 version(), case 77 68 65 6e 20 70 67 5f 65 6e 63 6f 64 69 6e 67 when pg_encoding 5f 74 6f 5f 63 68 61 72 28 31 29 20 3d 20 27 53 _to_char(1) = 'S 51 4c 5f 41 53 43 49 49 27 20 74 68 65 6e 20 27 QL_ASCII' then ' 55 4e 4b 4e 4f 57 4e 27 20 65 6c 73 65 20 67 65 UNKNOWN' else ge 74 64 61 74 61 62 61 73 65 65 6e 63 6f 64 69 6e tdatabaseencodin 67 28 29 20 65 6e 64 3b 00 g() end;. (2051, 14:06:25.222460) Didn't have data in all Backends (0 / 2). ************** handleConnectionLoop (it: 2) ************* (2051, 14:06:25.225652) (04) 1 descriptors modified. (2051, 14:06:25.225752) Didn't have data in all Backends (1 / 2). ************** handleConnectionLoop (it: 3) ************* (2051, 14:06:25.225819) (04) 1 descriptors modified. (2051, 14:06:25.225857) Didn't have data in all Backends (1 / 2). ************** handleConnectionLoop (it: 4) ************* Could you help please? Graziella Vella Junior Executive (I.T.) Go Mobile Malta |
From: Daniel V. S. <dv...@ar...> - 2002-11-06 22:15:24
|
Hello. The problem here seems to come from the fact that "dbbalancerd" may be us= ing a=20 UNIX socket to listen when the clients spawned try to access via a TCP=20 socket. The dbbalancer daemon decides the type of the server socket depen= ding=20 on the "daemon.host" parameter. If it is "local" or "localhost" it uses a= =20 UNIX socket and else, a TCP. BTW, which DBBalancer version are you using? I strongly encourage you to = use=20 the latest one, since all others are... erm... "buggy". The UNIX socket permission problems were solved in 0.4.1. Regards Daniel On Mi=E9 06 Nov 2002 19:13, Andrew McMillan wrote: > On Thu, 2002-11-07 at 02:10, Michael E. Labhard wrote: > > Andrew: > > > > Thank you for the reply. However, I don't see how the conf file you > > have attached differs significantly from the one I am using. Mine > > appears below along with the output from the run_test.sh command. An= y > > other ideas? > > Does the script try and do a TCP connection, or through a socket? Are > the permissions on the socket sufficient to allow the process to connec= t > to it? > > I know that in packaging DBBalancer for Debian I ran into a number of > socket permission problems. > > Regards, > Andrew. > > > > 6666 -> request 1: inf req/sProblem with the connection: could not > > connect to server: Connection refused > > Is the server running on host localhost and accepting > > TCP/IP connections on port 6666? > > > > > > 6666 -> request 1: inf req/sProblem with the connection: could not > > connect to server: Connection refused > > Is the server running on host localhost and accepting > > TCP/IP connections on port 6666? --=20 ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Andrew M. <an...@ca...> - 2002-11-06 18:14:06
|
On Thu, 2002-11-07 at 02:10, Michael E. Labhard wrote: > Andrew: > > Thank you for the reply. However, I don't see how the conf file you have > attached differs significantly from the one I am using. Mine appears below > along with the output from the run_test.sh command. Any other ideas? Does the script try and do a TCP connection, or through a socket? Are the permissions on the socket sufficient to allow the process to connect to it? I know that in packaging DBBalancer for Debian I ran into a number of socket permission problems. Regards, Andrew. > > -- Michael > > Confuration File: > > daemon.reader-port=6666 > daemon.writer-port=6666 > daemon.init-threads=5 > daemon.min-threads=5 > daemon.max-threads=30 > daemon.init-db-connections=5 > daemon.min-db-connections=5 > daemon.max-db-connections=30 > daemon.reaper-delay=1 > daemon.dbname=dbbalancer > daemon.user=mel > daemon.password= > daemon.auth-method=trusted > > machine.host=localhost > machine.dbname=dbbalancer > machine.port=5432 > machine.dbuser=mel > machine.dbpassword= > > > Test Output: > > ---------------------------------------------------------- > DBBalancer test script. Version 0.2.3 > ---------------------------------------------------------- > > For this script to work, you should have: > a) Created the db's in every host included in the pool (pgsql/create_db.sh) > b) Modified the variables on top of this script to point to your real config > c) Modified the $TESTER script or program to also point to your real config > d) Configured and started your backend databases and DBBalancerDaemon > processes > > ---------------------------------------------------------- > Checking reader process ......OK! > > ---------------------------------------------------------- > 1. One concurrent user test. > ---------------------------------------------------------- > > ---------------------------------------------------------- > 1.1 Direct to Postgres (5432). > > > > Iterations : 1000 > Server Port : 5432 > Query : SELECT TB_ONE.FIELD1, TB_ONE.FIELD2, TB_TWO.FIELD1 FROM > TB_ONE,TB_TWO WHERE TB_ONE.FIELD2=TB_TWO.FIELD2 > > > ------------------------------------------ > Executed 1000 requests. > In 9.000000 seconds. > Had 0 errors. > ------------------------------------------ > Result: 111.111111 requests/second. > > > ---------------------------------------------------------- > 1.2 Thru DBBalancer (6666) > > > > Iterations : 1000 > Server Port : 6666 > Query : SELECT TB_ONE.FIELD1, TB_ONE.FIELD2, TB_TWO.FIELD1 FROM > TB_ONE,TB_TWO WHERE TB_ONE.FIELD2=TB_TWO.FIELD2 > > > > 6666 -> request 1: inf req/sProblem with the connection: could not connect to > server: Connection refused > Is the server running on host localhost and accepting > TCP/IP connections on port 6666? > > > 6666 -> request 1: inf req/sProblem with the connection: could not connect to > server: Connection refused > Is the server running on host localhost and accepting > TCP/IP connections on port 6666? > > > -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ --------------------------------------------------------------------- |
From: Andrew M. <an...@ca...> - 2002-11-03 05:38:19
|
On Sun, 2002-11-03 at 11:30, Dave Peticolas wrote: > > As far as backend replication goes, my limited research hasn't > turned up any really viable free software alternatives. The currently > available choices all seem rather limited or awkward to use. Is that > your experience or do you have a suggested replication package to use? Hi Dave, I think that the plan is to include updated replication code into PostgreSQL at some stage fairly soon. For my last project we rolled our own back-end replication, which was somewhat simplified by a clear set of input XML transactions effecting change to the database. We were able to identify these transactions and pass them to other backends for interpretation, hashing the result for verification. For myself I use DBBalancer for database pooling, although the model of only committing to all backends if a transaction has been successful in all cases is a good way towards 2phase commit. Regards, Andrew. -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ --------------------------------------------------------------------- |
From: Dave P. <da...@kr...> - 2002-11-02 22:30:42
|
On Sat, 2002-11-02 at 06:30, Daniel Varela Santoalla wrote: > Hello Dave. >=20 > Well, it is not exactly unfinished. It works, but is not the safest thing= in=20 > the world. My initial idea when implementing DBBalancer was to get a full= y=20 > transparent load balancing connection pool. But to use this you need all=20 > balanced databases to be in sync, and since no stable replication options= =20 > where available for Postgres in 2000, I provided this "kind of" replicati= on=20 > for the meantime. But the final idea is to use DBBalancer combined with=20 > "backend" replication. >=20 > Now should work correctly, but a write will fail if "any" of the backends= fail=20 > to write correctly, which may/may not be the correct thing to do dependin= g on=20 > which enviroment you are, since it assures sync, but divides the reliabil= ity=20 > of the system. Ah, ok, thanks very much for the information. As far as backend replication goes, my limited research hasn't turned up any really viable free software alternatives. The currently available choices all seem rather limited or awkward to use. Is that your experience or do you have a suggested replication package to use? thanks, dave |
From: Daniel V. S. <dv...@ar...> - 2002-11-02 14:41:59
|
Hello Dave. Well, it is not exactly unfinished. It works, but is not the safest thing= in=20 the world. My initial idea when implementing DBBalancer was to get a full= y=20 transparent load balancing connection pool. But to use this you need all=20 balanced databases to be in sync, and since no stable replication options= =20 where available for Postgres in 2000, I provided this "kind of" replicati= on=20 for the meantime. But the final idea is to use DBBalancer combined with=20 "backend" replication. Now should work correctly, but a write will fail if "any" of the backends= fail=20 to write correctly, which may/may not be the correct thing to do dependin= g on=20 which enviroment you are, since it assures sync, but divides the reliabil= ity=20 of the system. Regards Daniel. PS: I would be glad to hear any suggestions/advices.... On S=E1b 26 Oct 2002 20:12, Dave Peticolas wrote: > Hello, I am considering using dbbalancer for write replication, > but the documentation seems to indicate that that feature is > unfinished and may not handle failures well. Is that the case > with the current version? > > Does anyone have experience using dbbalancer for write replication > that they could share? > > thanks, > dave --=20 ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Dave P. <da...@kr...> - 2002-10-26 18:12:54
|
Hello, I am considering using dbbalancer for write replication, but the documentation seems to indicate that that feature is unfinished and may not handle failures well. Is that the case with the current version? Does anyone have experience using dbbalancer for write replication that they could share? thanks, dave |
From: Dario <da...@is...> - 2002-07-30 07:17:41
|
Thanks everybody for the help... but the problem persist I tried to lauch configure with thi s parameters: ./configure --with-pq=/usr/local/pgsql --with-pq-include=/usr/local/pgsql -- with-ACE=/usr/local/src/ACE_wrappers and here is the tail of config.log: configure:1423: c++ -o conftest -g -O2 conftest.C -lpq -L/usr/local/pgsql/lib -lpthread -ldl -lcrypt 1>&5 configure:1452: checking for main in -lpq++ configure:1467: c++ -o conftest -g -O2 conftest.C -lpq++ -L/usr/local/pgsql/lib -lpthread -l dl -lcrypt 1>&5 configure:1495: checking for libACE configure:1506: c++ -o conftest -I/usr/local/src/ACE_wrappers/include conftest.C -L/usr/local/src/ACE_wrappers/lib -lACE 1>&5 configure:1500:25: ace/Log_Msg.h: No such file or directory configure: failed program was: #line 1499 "configure" #include "confdefs.h" #include "ace/Log_Msg.h" int main() { ACE_OS::exit(1) ; return 0; } Any idea ??? Thank you Dario da...@is... ______________________________________________________________________ Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità. http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/ |
From: Daniel V. S. <dv...@ar...> - 2002-07-25 20:10:02
|
Hello Dario. First at all, I have to tell you that xerces-c is not necessary from version 0.3.0 or so. It was only used to parse a XML configuration file, but I've changed it so now there's one less dependency. Regarding the libACE.so problem, it is hard to know, but take in consideration that ACE library is expected at the "--with-ACE"/lib directory and ACE includes at "--with-ACE"/include/ace, so you will have to create two symbolic links instead of one. Anyway, the definitive answer is in the "config.log" file. If you can send it, we'll see what it says. Regards Daniel PS: I'm thinking on supporting by default the ACE_wrappers configuration, because many people is having problems when trying to compile DBBalancer with a "not completely installed" ACE. On Jue 25 Jul 2002 14:21, Dario wrote: > Hi > > I downloaded dbbalancer 0.4.3 source to try it but I can't install it. > Where is the problem ? > > My operation is > 1)- I have installed ACE 5.2 and xerces-c 1.7.0 > > 2)- When I launch > ./configure --with-pq=/usr/local/pgsql --with-pq-include=/usr/local/pgsql > --with-ACE=/usr/local/src/ACE_wrappers from DBBalancer root I receive this > message: > libACE.so wasn't found. If it's installed in your system please use > --with-ACE parameter to specify the base directory of the installation. > > 3)- I look and the file libACE.so is in the /usr/local/src/ACE_wrappers/ace > folder so I created a symbolic link /usr/local/src/ACE_wrappers/lib but it > doesn't work... > > Please help me > Thanks > Dario > da...@is... -- ----------------------------------------------------- Regards from Spain^H^H^H^H^H England. Daniel Varela ----------------------------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Andrew M. <an...@ca...> - 2002-07-25 19:23:14
|
On Fri, 2002-07-26 at 00:21, Dario wrote: > Hi > > I downloaded dbbalancer 0.4.3 source to try it but I can't install it. Where is the problem ? > > My operation is > 1)- I have installed ACE 5.2 and xerces-c 1.7.0 > > 2)- When I launch > ./configure --with-pq=/usr/local/pgsql --with-pq-include=/usr/local/pgsql > --with-ACE=/usr/local/src/ACE_wrappers > from DBBalancer root I receive this message: > libACE.so wasn't found. If it's installed in your system please use --with-ACE parameter to specify the base directory of the installation. > > 3)- I look and the file libACE.so is in the /usr/local/src/ACE_wrappers/ace folder so I created a symbolic link /usr/local/src/ACE_wrappers/lib but it doesn't work... Once you have installed libACE it probably won't be in /usr/local/src/ACE_wrappers - it is more likely in /usr/local/lib or /usr/local Have you tried --with-ACE=/usr/local or --with-ACE=/usr/local/ace or --with-ACE=/usr/local/lib ? Regards, Andrew. -- -------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Are you enrolled at http://schoolreunions.co.nz/ yet? |
From: Dario <da...@is...> - 2002-07-25 12:26:38
|
Hi I downloaded dbbalancer 0.4.3 source to try it but I can't install it. = Where is the problem ? My operation is 1)- I have installed ACE 5.2 and xerces-c 1.7.0 2)- When I launch=20 ./configure --with-pq=3D/usr/local/pgsql = --with-pq-include=3D/usr/local/pgsql = --with-ACE=3D/usr/local/src/ACE_wrappers from DBBalancer root I receive this message: libACE.so wasn't found. If it's installed in your system please use = --with-ACE parameter to specify the base directory of the installation. 3)- I look and the file libACE.so is in the = /usr/local/src/ACE_wrappers/ace folder so I created a symbolic link = /usr/local/src/ACE_wrappers/lib but it doesn't work... Please help me Thanks Dario da...@is... |
From: Daniel V. S. <dv...@ar...> - 2002-02-13 23:37:46
|
On Fri 08 Feb 2002 13:52, Andrew McMillan wrote: > On Thu, 2002-02-07 at 13:46, Daniel Varela Santoalla wrote: > Well not _necessarily_ synchronous. The point is that like Apache we > want a pre-forked pool of connections! The (a) choice of my earlier > e-mail, where we use an existing pre-forked connection _is_ essential, > and having a <configurable> nunmber of these ready to handle demand is > critical. It's also current behaviour. Well, this can be achieved with the current schema. Currently we create as many new connections as pools in each "grow" (in case of just ConnectionPooling, not balancing, this equals to one, as there's only one host, and hence one pool), but we could easily parametrize a multiplying factor. This would always give us enough "spare power" to handle continuing load growths. > > What this proposal is talking about are those (hopefully fairly > infrequent) situations where that isn't enough. Slashdot links to us > and suddenly we are dead meat, but _how_ did we die? We should try and > handle this unpredictable load as far as is possible. > > In the real world when these situations happen we _do_ have spare > capacity to cope with peaks - just not enough for Everest. So we want > to do our best to support the extra users, but we don't want to overdo > it and end up serving nobody... In that cases the maximum limit of connections should cope. > > I see. So for incoming connections which are in a 'pending' state we > will need a thread available? Why? I had assumed that it would be > handled within the connection setup, before we have decided whether or > not we can actually service the request. The connections are accepted by the main thread, in DBBalancerDaemon.cc, method "run()". Then they are immediately enqueued till an available thread comes and process the request. No connection is rejected, whatever the load we have, just enqueued. > > I see this point as being a queue, rather than a parallel set of > threads. The connection threads would be what we would hand the > connection off to, once we had made sure one was available. Obviously > this complicates the connection startup code, but it doesn't have to get > in the way too much. There are a queue "and" a parallel set of threads, all of them competing to get a "Request" off the queue. > Yes, the inbound/outbound connection numbers should always be the same, > although the configuration file lets you specify separate counts > (probably needs to be fixed :-) Sure :-). I defined those parameters previously to actually implement any algorithm. And I'm a little lazy to delete my code (you're never sure....) but it gets confusing, I know. I'll change that soon. > > Could we implement what I am proposing within the current architecture > by adding a function to your manager thread that will get it to create a > new connection in the pool on request. An incoming connection could > then queue, if no connections are available then the thread requests a > connection and enters a queue. When the connection is started in due > course we can hand it over to the connection request which can then > commence work. Some points here: a) We have to be very careful with which "load" we add to the connection accepting. This runs serialized for every connection attempt in the main thread, so this can easily become a bottleneck if not handled with care. b) There is no way that an "about-to-be-enqueued" request can know if it will have a thread/connection available. It could check the queue state but, given the number of concurrent threads that wouldn't be "definitive" at a given time. c) If the request "signalled" the manager thread to create more thread/connections, it wouldn't be created anyway till the next pass of the manager thread (once each "daemon.reaper-delay"), and that is exactly what happens with the current strategy. If minimum response time is what we need (response time defined as time_when_new_thread/connection_is_created minus time_when_we_could_have_known_we_needed_one) then another strategy could be implemented, but I'm not so sure that we need to reduce this..... > > And the strategy could be the current, modified, or any other. But take > > in consideration that while Apache only pools one kind of resource > > (processes), we pool two different (threads and connections). > > Sounds good. Can you not encapsulate the thread / db connection pair? > Are they not inseparable? I thought about that point. But seen two difficulties: a) The threads are hidden into the ACE_Task class, from ACE lib. But of course, the thread pool could be redesigned without it... b) The thread dispatching algorithm is not very predictable. You have a lot of threads competing for a lock, basically. Though this wouldn't be a problem for a simple connection pool, for a load balancing one you would probably want to control more "finely" the sequence of connection assignment, in a different way that the thread assignment. Having them separated we can control independently the way we assign connections from the pools... I'll submit to CVS the new version soon. It will hopefully include a "destroyer" variable load test.... Best Regards Daniel. -- ---------------------------------- Regards from Spain. Daniel Varela ---------------------------------- If you think education is expensive, try ignorance. -Derek Bok (Former Harvard President) |
From: Andrew M. <an...@ca...> - 2002-02-08 21:11:26
|
On Thu, 2002-02-07 at 13:46, Daniel Varela Santoalla wrote: > > The main difference that I see between this and the current strategy is about > the "synchronicity" of making new connections. In your proposal, is the > request thread who creates new connections when needed, depending on how long > its current wait is. This would be "synchronous" to the requests. So far, > this operation is done by a general thread, who grows or shrinks depending on > the average queue size, "asynchronously" to the requests. Well not _necessarily_ synchronous. The point is that like Apache we want a pre-forked pool of connections! The (a) choice of my earlier e-mail, where we use an existing pre-forked connection _is_ essential, and having a <configurable> nunmber of these ready to handle demand is critical. It's also current behaviour. What this proposal is talking about are those (hopefully fairly infrequent) situations where that isn't enough. Slashdot links to us and suddenly we are dead meat, but _how_ did we die? We should try and handle this unpredictable load as far as is possible. In the real world when these situations happen we _do_ have spare capacity to cope with peaks - just not enough for Everest. So we want to do our best to support the extra users, but we don't want to overdo it and end up serving nobody... > For implementing your proposal, further changes would be needed. I'll explain: > Currently, the daemon always has (SHOULD HAVE) the same number of threads > than of connections. This way, we are sure that every thread has an available > connection whenever they ask for one. If the connection pool grows, also does > the thread pool, and the same for shrinks. So it should be imposible to reach > a situation in which a request being processed (and hence assigned to a > thread) couldn't find its correspondent connection to use. A possible case > would be when a host of a balancing pool failed, but not in "normal" use. > Anyway, for this case it could be useful to introduce "growing" delays, as > you proposed, between the different runs of tests for a connection, saving > the case when threads temporaryly outnumber the "valid" connections available. I see. So for incoming connections which are in a 'pending' state we will need a thread available? Why? I had assumed that it would be handled within the connection setup, before we have decided whether or not we can actually service the request. I see this point as being a queue, rather than a parallel set of threads. The connection threads would be what we would hand the connection off to, once we had made sure one was available. Obviously this complicates the connection startup code, but it doesn't have to get in the way too much. > With this pattern a "processing" request never has to wait, and hence would > never have an opportunity to create a new connection. So, where do "excess" > request go? Well, they are kept in the thread pool queue, not being > "processed" till they not have a thread (and a connection) free for them. > That's why the growing and shrinking is done "asynchronously" by a "manager" > thread, checking the queue size. It's important to note that growing the > connection number WITHOUT growing the thread number is no use, as the new > connections will never be assigned concurrently. This adaptive behaviour is > driven by the queue size, which depends on the number of threads, not on the > number of connections. Yes, the inbound/outbound connection numbers should always be the same, although the configuration file lets you specify separate counts (probably needs to be fixed :-) Could we implement what I am proposing within the current architecture by adding a function to your manager thread that will get it to create a new connection in the pool on request. An incoming connection could then queue, if no connections are available then the thread requests a connection and enters a queue. When the connection is started in due course we can hand it over to the connection request which can then commence work. > I think that a way to proceed is to define a Plan. First, defining goals, > then defining ways to test them, and finally a strategy to get the goals. As > you already pointed, the goals could be (I copy from your Rationale): > > Rationale > > ========= > > > > Firstly, we want to try as hard as possible to give a requesting process > > a connection, rather than a failure. > > Never fail, OK > > > > > Secondly, starting a new connection is a reasonably high-overhead > > process so if one is demanded we should try and put it off slightly as a > > heuristic. This situation will only happen when we are experiencing a > > sudden load growth, so we want to be cautious about over-responding. > > Be cautious with grows, OK > > > > > Finally, when the load drops away from a peak we want to leave the > > machine more available for other maintenance tasks that might occur > > during the quieter periods. We still want to be ready to climb back > > into it if needed though. > > > > And be sure to free resources when no needed, OK. > > I plan to create a test script wich does some connections, then many > concurrent connections, then some serialized connections, then concurrent > again, etc, so that we could: > a) Test correct handling > b) Test performance. > > And the strategy could be the current, modified, or any other. But take in > consideration that while Apache only pools one kind of resource (processes), > we pool two different (threads and connections). Sounds good. Can you not encapsulate the thread / db connection pair? Are they not inseparable? Cheers, Andrew. -- -------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Are you enrolled at http://schoolreunions.co.nz/ yet? |