sqlrelay-discussion Mailing List for SQL Relay (Page 10)
Brought to you by:
mused
You can subscribe to this list here.
2005 |
Jan
|
Feb
(20) |
Mar
(27) |
Apr
(17) |
May
(32) |
Jun
(45) |
Jul
(49) |
Aug
(68) |
Sep
(44) |
Oct
(29) |
Nov
(64) |
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(61) |
Feb
(22) |
Mar
(25) |
Apr
(31) |
May
(18) |
Jun
(28) |
Jul
(19) |
Aug
(16) |
Sep
(8) |
Oct
(17) |
Nov
(32) |
Dec
(4) |
2007 |
Jan
(20) |
Feb
(25) |
Mar
(5) |
Apr
(12) |
May
(11) |
Jun
(18) |
Jul
(16) |
Aug
(22) |
Sep
(37) |
Oct
(20) |
Nov
(11) |
Dec
(2) |
2008 |
Jan
(11) |
Feb
(33) |
Mar
(12) |
Apr
(18) |
May
(22) |
Jun
(31) |
Jul
(23) |
Aug
(6) |
Sep
|
Oct
(10) |
Nov
(22) |
Dec
|
2009 |
Jan
(12) |
Feb
(8) |
Mar
(11) |
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(27) |
Aug
(2) |
Sep
(10) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
2010 |
Jan
(11) |
Feb
(18) |
Mar
(10) |
Apr
(28) |
May
(28) |
Jun
|
Jul
(27) |
Aug
(9) |
Sep
(21) |
Oct
(2) |
Nov
(2) |
Dec
(11) |
2011 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(2) |
Jun
(44) |
Jul
(9) |
Aug
(2) |
Sep
(12) |
Oct
(7) |
Nov
(11) |
Dec
(7) |
2012 |
Jan
(5) |
Feb
|
Mar
(9) |
Apr
(9) |
May
(12) |
Jun
|
Jul
(13) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
(10) |
2013 |
Jan
(21) |
Feb
(3) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(2) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
(4) |
2014 |
Jan
(7) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David M. <dav...@fi...> - 2011-06-09 15:48:20
|
Try adding an addresses="" field to the instance tag in your configuration. There's currently a bug where if the tag is missing altogether, then it thinks you meant not to listen on an inet port at all, even though the port is specified. It's fixed in CVS, but a new version with the fix hasn't been released yet. David Muse dav...@fi... On 06/08/2011 08:05 AM, Keith wrote: > Hi, I am trying to get sqlrelay to connect to a mssql server. I have had > 3 process / connections going to the MSSQL server but don't see anything > listening on port 9000 that I can connect to. Here's my configuration, > If someone could have a look at I would be really grateful. > > OS is Openbsd 4.9 x64 > sqlrelay-0.41 > rudiments-0.32.tar > freetds-0.82.1pre20100728p3 > > freetds.conf > [global] > ; tds version = 4.2 > ; dump file = /tmp/freetds.log > ; debug flags = 0xffff > ; timeout = 10 > ; connect timeout = 10 > text size = 64512 > [egServer70] > host = 192.168.1.2 > port = 1433 > tds version = 7.0 > [sqlserver80] > host = 192.168.1.2 > port = 1433 > tds version = 8.0 > > /usr/local/firstworks/etc/sqlrelay.conf > > > <?xml version="1.0"?> > <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> > <instances> > <instance id="mssql" port="9000" socket="/tmp/example.socket" > debug="listener" dbase="freetds" connections="3" maxconnections="15" > maxqueuelength="5" \ > growby="1" ttl="60" maxsessioncount="10" endofsession="commit" > sessiontimeout="600" runasuser="nobody" runasgroup="nobody" \ > cursors="5" authtier="listener" handoff="pass" deniedips="" > allowedips="" maxquerysize="65536" maxstringbindvaluelength="4000" \ > maxlobbindvaluelength="71680" idleclienttimeout="-1" > maxlisteners="-1" listenertimeout="0" reloginatstart="no" > timequeriessec="-1" timequeriesusec="-1"> > <users> > <user user="mssql1" password="mssql1"/> > </users> > <connections> > <connection connectionid="db1" > string="sybase=/etc/freetds.conf;user=AAA; > password=BBB;server=sqlserver80;db=CCC;" metric="1"/> > </connections> > </instance> > </instances> > > > If I try to start sqlrelay this is what happens................. > > # sqlr-start -id mssql > > Starting listener: > sqlr-listener -id mssql -config > /usr/local/firstworks/etc/sqlrelay.conf -debug > Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.11801 > > Starting 3 connections to db1 : > sqlr-connection-freetds -id mssql -connectionid db1 -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-freetds -id mssql -connectionid db1 -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-freetds -id mssql -connectionid db1 -config > /usr/local/firstworks/etc/sqlrelay.conf > > Starting scaler: > sqlr-scaler -id mssql -config /usr/local/firstworks/etc/sqlrelay.conf > > sqlr-scaler error: > The file > /usr/local/firstworks/var/sqlrelay/tmp/pids/sqlr-listener-mssql was not > found. > This usually means that the sqlr-listener is not running. > The sqlr-listener must be running for the sqlr-scaler to start. > > sqlr-scaler failed to start. > > > # ps -aux | grep sql > nobody 5280 0.0 0.4 3092 3108 ?? Ss 12:44PM 0:00.71 > sqlr-connection-freetds -id mssql -connectionid db1 -config > /usr/local/firstworks/etc/sqlre > nobody 20552 0.0 0.4 3036 3108 ?? Ss 12:44PM 0:00.05 > sqlr-connection-freetds -id mssql -connectionid db1 -config > /usr/local/firstworks/etc/sqlre > nobody 13263 0.0 0.4 2976 3064 ?? Ss 12:44PM 0:00.06 > sqlr-connection-freetds -id mssql -connectionid db1 -config > /usr/local/firstworks/etc/sqlre > root 17795 0.0 0.0 152 232 p0 R+/2 12:47PM 0:00.00 grep sql > > > # cat /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.11801 > 06/08/2011 12:44:49 BST listener [11801] : creating shared memory and > semaphores > > 06/08/2011 12:44:49 BST listener [11801] : id filename: > > 06/08/2011 12:44:49 BST listener [11801] : > /usr/local/firstworks/var/sqlrelay/tmp/ipc/mssql > > 06/08/2011 12:44:49 BST listener [11801] : creating shared memory... > > 06/08/2011 12:44:49 BST listener [11801] : creating semaphores... > > I can see three connection to the MSSQL Server. but the sqlr-listener > service is running. > Strangly if I run the same command as sqlr-start did to start the > listener but debug file is basicaly the same as it was but with a new IP > > > ============== > # > # sqlr-listener -id mssql -config > /usr/local/firstworks/etc/sqlrelay.conf -debug > Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.15787 > > And the process starts ! > nobody 32728 0.0 0.2 1224 1856 ?? Ss 12:58PM 0:00.02 > sqlr-listener -id mssql -config /usr/local/firstworks/etc/sqlrelay.conf > -debug > > Here is the icps output. > > # ipcs > Message Queues: > T ID KEY MODE OWNER GROUP > > Shared Memory: > T ID KEY MODE OWNER GROUP > m 458752 0 --rw-r----- nobody wheel > m 65537 17248914 --rw-r----- nobody wheel > > Semaphores: > T ID KEY MODE OWNER GROUP > s 524288 17248914 --rw------- nobody wheel > > I don't know what to try next so any feedback will really be appreciated. > > Thanks > Keith > > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: Keith <ke...@sc...> - 2011-06-08 12:32:36
|
Hi, I am trying to get sqlrelay to connect to a mssql server. I have had 3 process / connections going to the MSSQL server but don't see anything listening on port 9000 that I can connect to. Here's my configuration, If someone could have a look at I would be really grateful. OS is Openbsd 4.9 x64 sqlrelay-0.41 rudiments-0.32.tar freetds-0.82.1pre20100728p3 freetds.conf [global] ; tds version = 4.2 ; dump file = /tmp/freetds.log ; debug flags = 0xffff ; timeout = 10 ; connect timeout = 10 text size = 64512 [egServer70] host = 192.168.1.2 port = 1433 tds version = 7.0 [sqlserver80] host = 192.168.1.2 port = 1433 tds version = 8.0 /usr/local/firstworks/etc/sqlrelay.conf <?xml version="1.0"?> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> <instances> <instance id="mssql" port="9000" socket="/tmp/example.socket" debug="listener" dbase="freetds" connections="3" maxconnections="15" maxqueuelength="5" \ growby="1" ttl="60" maxsessioncount="10" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" \ cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" maxquerysize="65536" maxstringbindvaluelength="4000" \ maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1"> <users> <user user="mssql1" password="mssql1"/> </users> <connections> <connection connectionid="db1" string="sybase=/etc/freetds.conf;user=AAA; password=BBB;server=sqlserver80;db=CCC;" metric="1"/> </connections> </instance> </instances> If I try to start sqlrelay this is what happens................. # sqlr-start -id mssql Starting listener: sqlr-listener -id mssql -config /usr/local/firstworks/etc/sqlrelay.conf -debug Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.11801 Starting 3 connections to db1 : sqlr-connection-freetds -id mssql -connectionid db1 -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-freetds -id mssql -connectionid db1 -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-freetds -id mssql -connectionid db1 -config /usr/local/firstworks/etc/sqlrelay.conf Starting scaler: sqlr-scaler -id mssql -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-scaler error: The file /usr/local/firstworks/var/sqlrelay/tmp/pids/sqlr-listener-mssql was not found. This usually means that the sqlr-listener is not running. The sqlr-listener must be running for the sqlr-scaler to start. sqlr-scaler failed to start. # ps -aux | grep sql nobody 5280 0.0 0.4 3092 3108 ?? Ss 12:44PM 0:00.71 sqlr-connection-freetds -id mssql -connectionid db1 -config /usr/local/firstworks/etc/sqlre nobody 20552 0.0 0.4 3036 3108 ?? Ss 12:44PM 0:00.05 sqlr-connection-freetds -id mssql -connectionid db1 -config /usr/local/firstworks/etc/sqlre nobody 13263 0.0 0.4 2976 3064 ?? Ss 12:44PM 0:00.06 sqlr-connection-freetds -id mssql -connectionid db1 -config /usr/local/firstworks/etc/sqlre root 17795 0.0 0.0 152 232 p0 R+/2 12:47PM 0:00.00 grep sql # cat /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.11801 06/08/2011 12:44:49 BST listener [11801] : creating shared memory and semaphores 06/08/2011 12:44:49 BST listener [11801] : id filename: 06/08/2011 12:44:49 BST listener [11801] : /usr/local/firstworks/var/sqlrelay/tmp/ipc/mssql 06/08/2011 12:44:49 BST listener [11801] : creating shared memory... 06/08/2011 12:44:49 BST listener [11801] : creating semaphores... I can see three connection to the MSSQL Server. but the sqlr-listener service is running. Strangly if I run the same command as sqlr-start did to start the listener but debug file is basicaly the same as it was but with a new IP ============== # # sqlr-listener -id mssql -config /usr/local/firstworks/etc/sqlrelay.conf -debug Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.15787 And the process starts ! nobody 32728 0.0 0.2 1224 1856 ?? Ss 12:58PM 0:00.02 sqlr-listener -id mssql -config /usr/local/firstworks/etc/sqlrelay.conf -debug Here is the icps output. # ipcs Message Queues: T ID KEY MODE OWNER GROUP Shared Memory: T ID KEY MODE OWNER GROUP m 458752 0 --rw-r----- nobody wheel m 65537 17248914 --rw-r----- nobody wheel Semaphores: T ID KEY MODE OWNER GROUP s 524288 17248914 --rw------- nobody wheel I don't know what to try next so any feedback will really be appreciated. Thanks Keith |
From: David M. <dav...@fi...> - 2011-05-05 18:46:54
|
I recently discovered a fairly deep bug in the rudiments library that SQL Relay is built on. The bug could leave strings unterminated, leading to unpredictable results later including hanging and crashing. The bug is in the stringbuffer class. The clear method currently just looks like this: void stringbuffer::clear() { variablebuffer::clear(); } But should look like this: void stringbuffer::clear() { variablebuffer::clear(); _buffer()[0]='\0'; } The stringbuffer class is widely used and any program that uses it and calls it's clear method could potentially suffer from this issue. If you're seeing random crashes in SQL Relay, then this could possibly be the problem. A few folks have recently reported the sqlr-listener crashing during startup. Without doing some tracing, I can't be sure whether it uses this method or not, but if you're having that problem, this fix is worth a try. Assuming you built and installed from source, to apply the fix, you just need to make this change, recompile rudiments and copy src/.libs/librudiments-0.33.so.1.0.0 to /usr/local/firstworks/lib and restart sqlrelay. There's no need to rebuild any other software. Dave dav...@fi... _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: Rafael R. S. <di...@im...> - 2011-05-04 08:17:11
|
When using sqlr-start I get the following strange error: # sqlr-start -id lgmdb Starting listener: sqlr-listener -id lgmdb -config /usr/local/firstworks/etc/sqlrelay.conf Starting 3 connections to evcore : sqlr-connection-mysql -id lgmdb -connectionid evcore -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-mysql -id lgmdb -connectionid evcore -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-mysql -id lgmdb -connectionid evcore -config /usr/local/firstworks/etc/sqlrelay.conf Starting scaler: sqlr-scaler -id lgmdb -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-scaler error: The file /usr/local/firstworks/var/sqlrelay/tmp/pids/sqlr-listener-lgmdb was not found. This usually means that the sqlr-listener is not running. The sqlr-listener must be running for the sqlr-scaler to start. sqlr-scaler failed to start. Thanks to MP3.com for sponsoring: Clustered/Replicated database support. Perl API. Thanks to FeedLounge for sponsoring: Query routing and filtering. Enabling debugging gives a rather unhelpful trace (attched) that seems to say nothing about what happened to sqlr-listener that caused unexpected termination. I've tried to start it manually, and apparently sqlr-listener dies unexpectedly after starting two or more sqlr-connection-mysql instances. I also notice that the running sqlr-listener never actually listens on the port indicated in my config, only on a couple of sockets. Can anyone help? I have my configuration attached (with my database credentials obscured) in addition to the trace file. I'm using SQL Relay 0.41 on CentOS 5.3, Linux kernel 2.6.18-12.el5, x86_64. -- Nothing is ever as it seems. With appropriate equations I can prove this. |
From: David M. <dav...@fi...> - 2011-04-15 17:38:30
|
First, verify that the sqlr-listener process is ruinning: ps -efa | grep sqlr-listener If it has shut down for some reason, then you'd get that error. If the listener is running, verify that it's actually listening: netstat -anp | grep 1640 If the listener is running and listening, you might try using telnet to connect to that port as well, just to verify that the listener is up and listening: telnet localhost 1640 That should connect successfully, though it won't display any output other than that it was able to connect. If the listener is up, running and listening and you can telnet to it, then I'm really not sure what's going on. We'll have to troubleshoot it further. David Muse dav...@fi... On 04/11/2011 09:51 AM, Eli Dzah wrote: > Hi all, > Has anyone a suggestion on checks to perform to understand better the > cause of the error? > Thanks > Eli > > 2011/3/31 Eli Dzah <eli...@gm... <mailto:eli...@gm...>> > > Hi David, > I'm using 0.41 sqlrelay version on Solaris 9. > starting the application i receive the following output: > /Starting listener: > sqlr-listener -id MAINTPOOL -config > /usr/local/firstworks/etc/sqlrelay.conf/ > /Starting 5 connections to UDGE1 : > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf/ > /Starting cache manager: > sqlr-cachemanager > Warning: using default id./ > > /Thanks to MP3.com for sponsoring: > Clustered/Replicated database support. > Perl API. > Thanks to FeedLounge for sponsoring: > Query routing and filtering/ > regards > Eli > > 2011/3/30 Trung Le <let...@ya... > <mailto:let...@ya...>> > > Hi Eli, > > What version of SqlRelay are you using? > > Thanks, > > David > > --- On *Wed, 3/30/11, Eli Dzah /<eli...@gm... > <mailto:eli...@gm...>>/* wrote: > > > From: Eli Dzah <eli...@gm... > <mailto:eli...@gm...>> > Subject: [Sqlrelay-discussion] Perl DBI with SQLRelay: > DBD::SQLRelay::st execute failed: Couldn't connect to the > listener > To: sql...@li... > <mailto:sql...@li...> > Date: Wednesday, March 30, 2011, 7:05 AM > > > Hi, > i'm new to SQLRelay and trying to use this tool as > connection pool toward Oracle DB! > i started sqlrelay with one listner and five connection > toward the DB instance. > i see SQLRelay session on DB explorer with 'nobody' OS user. > i try to connect from the perl script using DBI as following: > / my $conn = > DBI->connect("DBI:SQLRelay:host=localhost;port=1640;socket=","radius","radius") > || die DBI->errstr;/ > // > my $sth = $conn->prepare($SEL); > ... > and receive no error during the script launch but when i > reach the execute point i receive the following error > $sth->execute() || die DBI->errstr; > /DBD::SQLRelay::st execute failed: Couldn't connect to the > listener/ > The connection worked before sqlrelay introduction with > direct connection to DB. > I search on web solution but without result. > Can someone help me on the problem? > Thanks, > eli > PS: find in attachment the instance configuration of SQLRelay > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > > -----Inline Attachment Follows----- > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > <http://mc/compose?to=Sql...@li...> > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > <mailto:Sql...@li...> > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: Eli D. <eli...@gm...> - 2011-04-11 13:51:54
|
Hi all, Has anyone a suggestion on checks to perform to understand better the cause of the error? Thanks Eli 2011/3/31 Eli Dzah <eli...@gm...> > Hi David, > > I'm using 0.41 sqlrelay version on Solaris 9. > > starting the application i receive the following output: > > *Starting listener: > sqlr-listener -id MAINTPOOL -config > /usr/local/firstworks/etc/sqlrelay.conf* > *Starting 5 connections to UDGE1 : > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf > sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config > /usr/local/firstworks/etc/sqlrelay.conf* > *Starting cache manager: > sqlr-cachemanager > Warning: using default id.* > > *Thanks to MP3.com for sponsoring: > Clustered/Replicated database support. > Perl API. > Thanks to FeedLounge for sponsoring: > Query routing and filtering* > > regards > Eli > > 2011/3/30 Trung Le <let...@ya...> > >> Hi Eli, >> >> What version of SqlRelay are you using? >> >> Thanks, >> >> David >> >> --- On *Wed, 3/30/11, Eli Dzah <eli...@gm...>* wrote: >> >> >> From: Eli Dzah <eli...@gm...> >> Subject: [Sqlrelay-discussion] Perl DBI with SQLRelay: DBD::SQLRelay::st >> execute failed: Couldn't connect to the listener >> To: sql...@li... >> Date: Wednesday, March 30, 2011, 7:05 AM >> >> >> Hi, >> >> i'm new to SQLRelay and trying to use this tool as connection pool toward >> Oracle DB! >> i started sqlrelay with one listner and five connection toward the DB >> instance. >> i see SQLRelay session on DB explorer with 'nobody' OS user. >> i try to connect from the perl script using DBI as following: >> >> * my $conn = >> DBI->connect("DBI:SQLRelay:host=localhost;port=1640;socket=","radius","radius") >> || die DBI->errstr;* >> ** >> my $sth = $conn->prepare($SEL); >> ... >> >> and receive no error during the script launch but when i reach the execute >> point i receive the following error >> >> $sth->execute() || die DBI->errstr; >> >> *DBD::SQLRelay::st execute failed: Couldn't connect to the listener* >> >> The connection worked before sqlrelay introduction with direct connection >> to DB. >> >> I search on web solution but without result. >> Can someone help me on the problem? >> >> Thanks, >> eli >> >> PS: find in attachment the instance configuration of SQLRelay >> >> >> -----Inline Attachment Follows----- >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and >> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >> >> -----Inline Attachment Follows----- >> >> _______________________________________________ >> Sqlrelay-discussion mailing list >> Sql...@li...<http://mc/compose?to=Sql...@li...> >> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and >> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >> >> _______________________________________________ >> Sqlrelay-discussion mailing list >> Sql...@li... >> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> >> > |
From: Eli D. <eli...@gm...> - 2011-03-31 10:03:55
|
Hi David, I'm using 0.41 sqlrelay version on Solaris 9. starting the application i receive the following output: *Starting listener: sqlr-listener -id MAINTPOOL -config /usr/local/firstworks/etc/sqlrelay.conf* *Starting 5 connections to UDGE1 : sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-connection-oracle8 -id MAINTPOOL -connectionid UDBA -config /usr/local/firstworks/etc/sqlrelay.conf* *Starting cache manager: sqlr-cachemanager Warning: using default id.* *Thanks to MP3.com for sponsoring: Clustered/Replicated database support. Perl API. Thanks to FeedLounge for sponsoring: Query routing and filtering* regards Eli 2011/3/30 Trung Le <let...@ya...> > Hi Eli, > > What version of SqlRelay are you using? > > Thanks, > > David > > --- On *Wed, 3/30/11, Eli Dzah <eli...@gm...>* wrote: > > > From: Eli Dzah <eli...@gm...> > Subject: [Sqlrelay-discussion] Perl DBI with SQLRelay: DBD::SQLRelay::st > execute failed: Couldn't connect to the listener > To: sql...@li... > Date: Wednesday, March 30, 2011, 7:05 AM > > > Hi, > > i'm new to SQLRelay and trying to use this tool as connection pool toward > Oracle DB! > i started sqlrelay with one listner and five connection toward the DB > instance. > i see SQLRelay session on DB explorer with 'nobody' OS user. > i try to connect from the perl script using DBI as following: > > * my $conn = > DBI->connect("DBI:SQLRelay:host=localhost;port=1640;socket=","radius","radius") > || die DBI->errstr;* > ** > my $sth = $conn->prepare($SEL); > ... > > and receive no error during the script launch but when i reach the execute > point i receive the following error > > $sth->execute() || die DBI->errstr; > > *DBD::SQLRelay::st execute failed: Couldn't connect to the listener* > > The connection worked before sqlrelay introduction with direct connection > to DB. > > I search on web solution but without result. > Can someone help me on the problem? > > Thanks, > eli > > PS: find in attachment the instance configuration of SQLRelay > > > -----Inline Attachment Follows----- > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > > -----Inline Attachment Follows----- > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li...<http://mc/compose?to=Sql...@li...> > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > |
From: Trung Le <let...@ya...> - 2011-03-30 17:26:23
|
Hi Eli, What version of SqlRelay are you using? Thanks, David --- On Wed, 3/30/11, Eli Dzah <eli...@gm...> wrote: From: Eli Dzah <eli...@gm...> Subject: [Sqlrelay-discussion] Perl DBI with SQLRelay: DBD::SQLRelay::st execute failed: Couldn't connect to the listener To: sql...@li... Date: Wednesday, March 30, 2011, 7:05 AM Hi, i'm new to SQLRelay and trying to use this tool as connection pool toward Oracle DB! i started sqlrelay with one listner and five connection toward the DB instance. i see SQLRelay session on DB explorer with 'nobody' OS user. i try to connect from the perl script using DBI as following: my $conn = DBI->connect("DBI:SQLRelay:host=localhost;port=1640;socket=","radius","radius") || die DBI->errstr; my $sth = $conn->prepare($SEL); ... and receive no error during the script launch but when i reach the execute point i receive the following error $sth->execute() || die DBI->errstr; DBD::SQLRelay::st execute failed: Couldn't connect to the listener The connection worked before sqlrelay introduction with direct connection to DB. I search on web solution but without result. Can someone help me on the problem? Thanks, eli PS: find in attachment the instance configuration of SQLRelay -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf -----Inline Attachment Follows----- _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
From: Trung Le <let...@ya...> - 2011-03-22 21:59:12
|
Hello, Need your help. I am using sql-relay version .41 and running to issue while trying to re-run my perl program after the first run. Bassically, I have a simple program that call store procedure to return a CURSOR in perl using SQL-Relay. Thing works fine on the first run which return correct data, anything after the first run the program return nothing. (Note, I only set up for one connection in .config file). However, I do not fine issue using sendquery("select * from dual"). I can run as many times as I wanted. NOTE: First time works, re-run no data return. Debug doesn't show any error either.I also note that if I increase the connection number, the result works...so if I have connection to 2 I can run 2 times. Please help? Thanks in advance, David Here is my test program in Perl code.------------------------------------------------------ #!/bin/perl -w use lib '/auto/SQL-RelaySolarixClient/perl'; use SQLRelay::Connection;use SQLRelay::Cursor; my $uid = "abcdef";my $pw = "xyz"; my $server = "build-lnx-010"; print qq`demo of prepareQuery("begin :curs := testproc; end;");\n`; my $conn = SQLRelay::Connection->new("$server",9000,"","$uid","$pw",0,1); if (! $conn->ping() ) { die "cannot connect"; } my $zz = $conn->identify(); print "$zz\n"; my $curs=SQLRelay::Cursor->new($conn); if (! $curs ) { die "bad curs"; } $curs->setResultSetBufferSize(10); $curs->prepareQuery("begin :mycurs2:=cbas_package.get_primary_keys; end;"); $curs->defineOutputBindCursor("mycurs2"); $curs->executeQuery() || die __LINE__ . $curs->errorMessage(); my $bindcur=$curs->getOutputBindCursor("mycurs2") || die; $bindcur->fetchFromBindCursor() || die; for (my $i=0; $i<$bindcur->rowCount(); $i++) { print("$i\n"); } $conn->endSession(); |
From: Sébastien B. <seb...@do...> - 2011-02-26 01:31:06
|
Hello, I try many things to solve this mistake... but i couldn't. I just saw that sqlrelay 0.39, with the same conf start without any problems. "Is in the old pots that the best jams." Séb Le 17/02/11 14:32, Sébastien BROCHET a écrit : > Hello, > > I have a mistake with 2 boxes (Debian 6 and Solaris 10u8). > > i launch sqlrelay debugging Listener : > > [root@localhost sqlrelay-0.41]# sqlr-start -id M1DB1 > > Starting listener: > sqlr-listener -id M1DB1 -config > /usr/local/firstworks/etc/sqlrelay.conf -debug > Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.13625 > > Starting 1 connections to M1DB1 : > sqlr-connection-oracle8 -id M1DB1 -connectionid M1DB1 -config > /usr/local/firstworks/etc/sqlrelay.conf > > Starting scaler: > sqlr-scaler -id M1DB1 -config /usr/local/firstworks/etc/sqlrelay.conf > > sqlr-scaler error: > The file > /usr/local/firstworks/var/sqlrelay/tmp/pids/sqlr-listener-M1DB1 was > not found. > This usually means that the sqlr-listener is not running. > The sqlr-listener must be running for the sqlr-scaler to start. > > > sqlr-scaler failed to start. > > [root@localhost sqlrelay-0.41]# cat > /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.13625 > creating shared memory and semaphores > > id filename: > > /usr/local/firstworks/var/sqlrelay/tmp/ipc/M1DB1 > > creating shared memory... > > creating semaphores... > > [root@localhost sqlrelay-0.41]# > > I don't understand why listener refuse to boot. > > Any idea ? > > Séb. > |
From: Sébastien B. <seb...@do...> - 2011-02-17 13:50:14
|
Hello, I have a mistake with 2 boxes (Debian 6 and Solaris 10u8). i launch sqlrelay debugging Listener : [root@localhost sqlrelay-0.41]# sqlr-start -id M1DB1 Starting listener: sqlr-listener -id M1DB1 -config /usr/local/firstworks/etc/sqlrelay.conf -debug Debugging to: /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.13625 Starting 1 connections to M1DB1 : sqlr-connection-oracle8 -id M1DB1 -connectionid M1DB1 -config /usr/local/firstworks/etc/sqlrelay.conf Starting scaler: sqlr-scaler -id M1DB1 -config /usr/local/firstworks/etc/sqlrelay.conf sqlr-scaler error: The file /usr/local/firstworks/var/sqlrelay/tmp/pids/sqlr-listener-M1DB1 was not found. This usually means that the sqlr-listener is not running. The sqlr-listener must be running for the sqlr-scaler to start. sqlr-scaler failed to start. [root@localhost sqlrelay-0.41]# cat /usr/local/firstworks/var/sqlrelay/debug/sqlr-listener.13625 creating shared memory and semaphores id filename: /usr/local/firstworks/var/sqlrelay/tmp/ipc/M1DB1 creating shared memory... creating semaphores... [root@localhost sqlrelay-0.41]# I don't understand why listener refuse to boot. Any idea ? Séb. |
From: Marcin K. <mr...@gm...> - 2010-12-30 18:55:41
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello everyone, I need SQLRelay's capabilities, but am very new to it (in fact I just found it), so I have two questions: 1. Can *multiple* SQLRelay instances be used to hand over queries to the "same" (replicated) database residing on multiple postgres instances? I.e. I'd have: node1 sqlrelay_instance1 postgres_instance_1_with_db_FOO node2 sqlrelay_instance2 postgres_instance_2_with_db_FOO ... node_n sqlrelay_instance_n postgres_instance_n_with_db_FOO I need to have: - - write (INSERT/UPDATE/SET) query arriving at any node from 1 to n being distributed to FOO database on ALL n nodes - - read (SELECT) query being used locally or on least loaded instance of FOO Why so: I don't particularly need blazing performance, the thing is I rather need replication for reliability rather than for performance. 2. I need to connect to Postgres via SQLRelay, but with SQLAlchemy at front. Is that even possible? Connecting to db in SA is a snap, just specify the url, but the question is, can I "fool" SA into believing that what it connects to is PG db? At first it might look like this is a question more directly related to SA, but actually think about it: the issue is if SQLRelay "imitates" PG perfectly. If so, any DB client connecting to SQLRelay should be able to think it is actually connecting to particular db at the other end! The thing is I have no idea if SQLRelay does this sort of perfect "imitation". - -- Regards, mk - -- Premature optimization is the root of all fun. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNHNWkAAoJEFMgHzhQQ7hOyIkH/1NsEJNktJVA1dJoSXGKN9lN bZ+8JQ6U/wGyQrzhLk6wmZqE3dH2N+GGDDcNfK3uTAikv/ujj0+9jxH1hWxcekSb 0UFd2KLhb4Zs9ll+GckKQo544tmburEob3C408d48HuQdED0/Mge+1OpLf3FEcEO Lz7/9PxK1iXaKWv9zn6MH7Sy6LIMQzQilFC5t5CHqXWHLMkf9R/xB+PH9yAcfND5 h9OYg+3h9dqt+MomiExDcF8CMSW6CfmZop3Hep63aORED8sX2rDZrZhpCmkfcAEP AmLeDvbJQgyJER/qBkHAVOEagLjguGxZVr25uOi2oDM5qJ95XjCKAlrr55no4XM= =2oSV -----END PGP SIGNATURE----- |
From: Renat S. <sr...@st...> - 2010-12-16 13:06:24
|
16.12.2010 09:26, David Muse пишет: > Ok, let me see if I understand this correctly... > > Detach instance: 1 heap containing both the result set buffer and > everything else, with a small page size (4k, 8k, or something) > Nodetach instance: 2 heaps, one containing the result set buffer, with a > 4M page size and another containing everything else with a small page size. > > Does that sound right? Yes, exactly like you wrote. > Not detaching must trigger some subtle behavior in the solaris memory > allocator, resulting in the two heaps. I'm not sure why you wouldn't > get that in both cases, but I'd think one would have to really > understand the allocator inside and out to be able to say why. I really don't know what happens inside solaris allocator, but I tried a simple program like this and commenting out fork() call was changing behaviour. ----- #include <unistd.h> #include <stdlib.h> int main (int argc, char **argv) { if (fork()) exit(0); char * a[10]; char * b = (char *)malloc(1000); int i; for (i=0; i<50; i++) { a[i] = (char *)malloc(256 * 32768); } sleep ( 30); for (i=0; i<50; i++) { free (a[i]); } free (b); return 0; } ----- > It sounds like the approach you're using should yield predictable > results in both cases. I'd think a second heap with a 4M page size for > the result set buffer would yield higher performance, but of course, at > the cost of using additional memory. I'm not sure about higher performance, but cost is a lot of additional memory, which can cause swapping and huge performance degrade. :) -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
From: David M. <dav...@fi...> - 2010-12-16 06:27:01
|
Ok, let me see if I understand this correctly... Detach instance: 1 heap containing both the result set buffer and everything else, with a small page size (4k, 8k, or something) Nodetach instance: 2 heaps, one containing the result set buffer, with a 4M page size and another containing everything else with a small page size. Does that sound right? Not detaching must trigger some subtle behavior in the solaris memory allocator, resulting in the two heaps. I'm not sure why you wouldn't get that in both cases, but I'd think one would have to really understand the allocator inside and out to be able to say why. It sounds like the approach you're using should yield predictable results in both cases. I'd think a second heap with a 4M page size for the result set buffer would yield higher performance, but of course, at the cost of using additional memory. This is very interesting, I had no idea solaris did this, or that you could override the memory allocator like that. Very cool. Dave dav...@fi... On 12/14/2010 10:29 AM, Renat Sabitov wrote: > Having made all sorts of tests, I found that Solaris dynamically chooses > pagesize for heap. In addition to this, malloc on solaris writes some > data in memory (I assume it creates a pool and stores some information > of allocated size in it), so all "dirty" chunks became an "Anon" memory. > When it decides to use 4M pagesize, writing only few bytes makes 4M > chunk to be stored in "real" memory of process. > > I found some information about controlling pagesize for process. > > http://www.solarisinternals.com/wiki/index.php/Multiple_Page_Size_Support#Support_for_Large_Pages_within_the_Kernel.27s_Address_Space > > You can set preferred pagesize by 3 ways: > 1. A wrapper program, ppgsz(1) > 2. A preload library, libmpss.so.1 > 3. A programmatic interface, memcntl(2) > > We are particularly interested in the second way, because of it's > simplicity. First way won't work, since "exec" function returns pagesize > choosing algorithm to default. So having this commands in the start > script will keep pagesize to 8K > > export LD_PRELOAD=$LD_PRELOAD:mpss.so.1 > export MPSSHEAP=8K > > 13.12.2010 18:57, Renat Sabitov пишет: > >> Further investigations shows, that there are 2 heap segments for >> "nodetach" case, and the second is exactly the size of memory, allocated >> for oracle8 cursors buffers (def_buf). It is 5 (cursors) * 10 >> (FETCH_AT_ONCE) * 256 (MAX_SELECT_LIST_SIZE) * 32768 >> (MAX_ITEM_BUFFER_SIZE) = 409600K. Ok, but why it goes in whole piece to >> "Anon" memory, which is "the actual physical memory that is allocated >> uniquely to my process and not to any other processes" (according to >> http://blogs.sun.com/nickstephen/entry/solaris_measuring_the_memory_overhead)? >> >> >> pmem output: >> >> case 1 (nodetach): >> >> Address Kbytes RSS Anon Locked Mode Mapped File >> 00010000 56 56 - - r-x-- sqlr-connection-oracle8 >> 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 >> 00030000 3904 1248 1248 - rwx-- [ heap ] >> 00400000 409600 409600 409600 - rwx-- [ heap ] >> F7000000 85128 51400 - - r-x-- libociei.so >> FC330000 8 8 8 - rwx-- libociei.so >> FC400000 888 888 - - r-x-- libc.so.1 >> ... >> >> case 2 (detach): >> >> Address Kbytes RSS Anon Locked Mode Mapped File >> 00010000 56 56 - - r-x-- sqlr-connection-oracle8 >> 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 >> 00030000 411488 15296 14288 - rwx-- [ heap ] >> F7000000 85128 51400 - - r-x-- libociei.so >> FC330000 8 8 - - rwx-- libociei.so >> FC400000 888 888 - - r-x-- libc.so.1 >> ... >> >> >> > > _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: Carlos V. <cve...@em...> - 2010-12-14 15:50:24
|
Nice work Renat! -----Original Message----- From: Renat Sabitov [mailto:sr...@st...] Sent: Tuesday, December 14, 2010 9:30 AM To: Discussion of topics related to SQL Relay Subject: [SPAM] - Re: [Sqlrelay-discussion] Memory consumtion under SunOS (detach or nodetach) - SOLUTION - Email found in subject Having made all sorts of tests, I found that Solaris dynamically chooses pagesize for heap. In addition to this, malloc on solaris writes some data in memory (I assume it creates a pool and stores some information of allocated size in it), so all "dirty" chunks became an "Anon" memory. When it decides to use 4M pagesize, writing only few bytes makes 4M chunk to be stored in "real" memory of process. I found some information about controlling pagesize for process. http://www.solarisinternals.com/wiki/index.php/Multiple_Page_Size_Support#Support_for_Large_Pages_within_the_Kernel.27s_Address_Space You can set preferred pagesize by 3 ways: 1. A wrapper program, ppgsz(1) 2. A preload library, libmpss.so.1 3. A programmatic interface, memcntl(2) We are particularly interested in the second way, because of it's simplicity. First way won't work, since "exec" function returns pagesize choosing algorithm to default. So having this commands in the start script will keep pagesize to 8K export LD_PRELOAD=$LD_PRELOAD:mpss.so.1 export MPSSHEAP=8K 13.12.2010 18:57, Renat Sabitov пишет: > Further investigations shows, that there are 2 heap segments for > "nodetach" case, and the second is exactly the size of memory, allocated > for oracle8 cursors buffers (def_buf). It is 5 (cursors) * 10 > (FETCH_AT_ONCE) * 256 (MAX_SELECT_LIST_SIZE) * 32768 > (MAX_ITEM_BUFFER_SIZE) = 409600K. Ok, but why it goes in whole piece to > "Anon" memory, which is "the actual physical memory that is allocated > uniquely to my process and not to any other processes" (according to > http://blogs.sun.com/nickstephen/entry/solaris_measuring_the_memory_overhead)? > > > pmem output: > > case 1 (nodetach): > > Address Kbytes RSS Anon Locked Mode Mapped File > 00010000 56 56 - - r-x-- sqlr-connection-oracle8 > 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 > 00030000 3904 1248 1248 - rwx-- [ heap ] > 00400000 409600 409600 409600 - rwx-- [ heap ] > F7000000 85128 51400 - - r-x-- libociei.so > FC330000 8 8 8 - rwx-- libociei.so > FC400000 888 888 - - r-x-- libc.so.1 > ... > > case 2 (detach): > > Address Kbytes RSS Anon Locked Mode Mapped File > 00010000 56 56 - - r-x-- sqlr-connection-oracle8 > 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 > 00030000 411488 15296 14288 - rwx-- [ heap ] > F7000000 85128 51400 - - r-x-- libociei.so > FC330000 8 8 - - rwx-- libociei.so > FC400000 888 888 - - r-x-- libc.so.1 > ... > > -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion �[�����[�[^KY\��\��[ |
From: Renat S. <sr...@st...> - 2010-12-14 15:29:46
|
Having made all sorts of tests, I found that Solaris dynamically chooses pagesize for heap. In addition to this, malloc on solaris writes some data in memory (I assume it creates a pool and stores some information of allocated size in it), so all "dirty" chunks became an "Anon" memory. When it decides to use 4M pagesize, writing only few bytes makes 4M chunk to be stored in "real" memory of process. I found some information about controlling pagesize for process. http://www.solarisinternals.com/wiki/index.php/Multiple_Page_Size_Support#Support_for_Large_Pages_within_the_Kernel.27s_Address_Space You can set preferred pagesize by 3 ways: 1. A wrapper program, ppgsz(1) 2. A preload library, libmpss.so.1 3. A programmatic interface, memcntl(2) We are particularly interested in the second way, because of it's simplicity. First way won't work, since "exec" function returns pagesize choosing algorithm to default. So having this commands in the start script will keep pagesize to 8K export LD_PRELOAD=$LD_PRELOAD:mpss.so.1 export MPSSHEAP=8K 13.12.2010 18:57, Renat Sabitov пишет: > Further investigations shows, that there are 2 heap segments for > "nodetach" case, and the second is exactly the size of memory, allocated > for oracle8 cursors buffers (def_buf). It is 5 (cursors) * 10 > (FETCH_AT_ONCE) * 256 (MAX_SELECT_LIST_SIZE) * 32768 > (MAX_ITEM_BUFFER_SIZE) = 409600K. Ok, but why it goes in whole piece to > "Anon" memory, which is "the actual physical memory that is allocated > uniquely to my process and not to any other processes" (according to > http://blogs.sun.com/nickstephen/entry/solaris_measuring_the_memory_overhead)? > > > pmem output: > > case 1 (nodetach): > > Address Kbytes RSS Anon Locked Mode Mapped File > 00010000 56 56 - - r-x-- sqlr-connection-oracle8 > 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 > 00030000 3904 1248 1248 - rwx-- [ heap ] > 00400000 409600 409600 409600 - rwx-- [ heap ] > F7000000 85128 51400 - - r-x-- libociei.so > FC330000 8 8 8 - rwx-- libociei.so > FC400000 888 888 - - r-x-- libc.so.1 > ... > > case 2 (detach): > > Address Kbytes RSS Anon Locked Mode Mapped File > 00010000 56 56 - - r-x-- sqlr-connection-oracle8 > 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 > 00030000 411488 15296 14288 - rwx-- [ heap ] > F7000000 85128 51400 - - r-x-- libociei.so > FC330000 8 8 - - rwx-- libociei.so > FC400000 888 888 - - r-x-- libc.so.1 > ... > > -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
From: Renat S. <sr...@st...> - 2010-12-13 15:57:35
|
Further investigations shows, that there are 2 heap segments for "nodetach" case, and the second is exactly the size of memory, allocated for oracle8 cursors buffers (def_buf). It is 5 (cursors) * 10 (FETCH_AT_ONCE) * 256 (MAX_SELECT_LIST_SIZE) * 32768 (MAX_ITEM_BUFFER_SIZE) = 409600K. Ok, but why it goes in whole piece to "Anon" memory, which is "the actual physical memory that is allocated uniquely to my process and not to any other processes" (according to http://blogs.sun.com/nickstephen/entry/solaris_measuring_the_memory_overhead)? pmem output: case 1 (nodetach): Address Kbytes RSS Anon Locked Mode Mapped File 00010000 56 56 - - r-x-- sqlr-connection-oracle8 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 00030000 3904 1248 1248 - rwx-- [ heap ] 00400000 409600 409600 409600 - rwx-- [ heap ] F7000000 85128 51400 - - r-x-- libociei.so FC330000 8 8 8 - rwx-- libociei.so FC400000 888 888 - - r-x-- libc.so.1 ... case 2 (detach): Address Kbytes RSS Anon Locked Mode Mapped File 00010000 56 56 - - r-x-- sqlr-connection-oracle8 0002C000 16 16 8 - rwx-- sqlr-connection-oracle8 00030000 411488 15296 14288 - rwx-- [ heap ] F7000000 85128 51400 - - r-x-- libociei.so FC330000 8 8 - - rwx-- libociei.so FC400000 888 888 - - r-x-- libc.so.1 ... -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
From: Renat S. <sr...@st...> - 2010-12-13 13:34:11
|
> case 2: -detach wasn't applied this should be read as case 2: -nodetach was applied -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
From: Renat S. <sr...@st...> - 2010-12-13 13:33:57
|
Hello! I found a strange effects while running sqlrelay under SunOS 5.10 (Solaris). It seams that "detach" option has some influence on memory management. case 1: -detach was applied ---- top output ---- PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND 3630 onyma 1 59 0 530M 33M sleep 0:00 0.00% ./sqlr-connection-oracle8 -silent -detach ---- end of top output ---- case 2: -detach wasn't applied ---- top output ---- PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND 3647 onyma 1 42 0 532M 468M sleep 0:00 0.00% ./sqlr-connection-oracle8 -silent -ttl 60 ---- end of top output ---- Do you see the difference? RES in the first case is 33M but 468M in the second. Do you have any ideas why it is so? As a result of this I have out of memory problem on our production server under SunOS 5.10 (Solaris). -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
From: Cameron L. <cla...@gm...> - 2010-12-11 00:38:48
|
On Fri, Nov 12, 2010 at 4:23 PM, Axel Hansen <axe...@gm...>wrote: > Hi everyone, > > I've recently set up sql relay to use for connection pooling and read/write > routing for two mysql databases. I have a web application in python that > used to use MySQLdb for cursors and to connect. I switched my code over to > use PySQLRDB, which also implements the python DB api. PySQLRDB is acting > unexpectedly though. I had to add a call to CSQLRelay by hand to get it to > return None values for NULL fields (which still doesn't work perfectly), and > fetchone() would return a false row with 0s when nothing was returned from a > SELECT (even though fetchall would return an empty array). My biggest > problem though is getting unicode support, which MySQLdb cursors did very > well. I've modified PySQLRDB's getRow to check if any of the columns are > strings and then convert them to unicode, but I'll have to be a bit more > sophisticated to deal with the actual column type (for example, binary data > should not be converted to ascii). > > My question is, has anyone else dealt with these kinds of problems and is > the approach I'm taking (modifying PySQLRDB to fix/change its behavior) the > best solution? I keep > ... I've also seen inconsistencies with the Zope Adapter in regard to empty result-sets. I've had bigger problems to solve, and so haven't tracked down my empty-vs-None symptoms. My best guess, though, is that at least some of them remain in the latest sources. -- Cameron Laird Phaseit, Inc. +1 281 648 9889 |
From: Cameron L. <cla...@gm...> - 2010-12-08 23:06:29
|
I have symptoms that are a bit involved to describe. The summary is this: my Zope Adapter sometimes complains that "Couldn't connect to the listener" at the same time as, for example, a command-line sqlrsh or a *different* Zope Adapter (that is, one built into a different instance of Zope) happily launches and retrieves good-looking data. To anthropomorphize even more than usual, it feels as though the Zope Adapter doesn't *want* to connect, not that it can't (because other clients happily connect). Reproducibility of the symptom is variable: some Zope servers have this happen sporadically, then seem to "get better"; others lock up, in that Zope happily does all its Zope stuff, except that it refuses to retrieve any new SQL Results (but a Z SQL Method already activated earlier in the same process might, or might not, continue to work). Essentially all my client instances are running 64-bit Ubuntu, with Zope at 2.8-2.9. I'm unsure how to read the version number of an Adapter; the installed source has lines such as $Id: DA.py,v 1.1.1.1 2002/11/16 06:49:52 mused Exp $''' % database_type __version__='$Revision: 1.1.1.1 $'[11:-2] I'm open to suggestion on what my options are. Until I come up with something better, I'm restarting my Zope instance, which at least gives me symptomatic relief, in that my queries all work for a few hours afterward. -- Cameron Laird Phaseit, Inc. +1 281 648 9889 |
From: Cal H. <ca...@fb...> - 2010-12-07 17:42:40
|
Hi everyone, I wanted to run some tests on all of the patches applied to the CVS version of relay. I'm assuming it requires the CVS version of rudiments as well? (I had compile errors with rudiments 0.32) I'm stuck at the moment with an older gcc, version 3.4.6. I get an error on environment.C: /bin/sh ../libtool --mode=compile g++ -pipe -Wall -D_REENTRANT -D_THREAD_SAFE -D__EXTENSIONS__ -pthread -I/usr/kerberos/include -I/usr/include/pcre -I../ -I../include -DINCLUDE_INETCLIENT -DINCLUDE_INETSERVER -DINCLUDE_UNIXCLIENT -DINCLUDE_MODEMSERVER -DINCLUDE_UNIXSERVER -c environment.C -o environment.lo g++ -pipe -Wall -D_REENTRANT -D_THREAD_SAFE -D__EXTENSIONS__ -pthread -I/usr/kerberos/include -I/usr/include/pcre -I../ -I../include -DINCLUDE_INETCLIENT -DINCLUDE_INETSERVER -DINCLUDE_UNIXCLIENT -DINCLUDE_MODEMSERVER -DINCLUDE_UNIXSERVER -c environment.C -fPIC -DPIC -o .libs/environment.o environment.C: In member function `void rudiments::environment::init()': environment.C:38: error: argument of type `void (rudiments::environment::)()' does not match `void (*)()' environment.C: In static member function `static bool rudiments::environment::setValue(const char*, const char*)': environment.C:54: error: cannot call member function `void rudiments::environment::init()' without object make: *** [environment.lo] Error 1 I've tried to massage this function pointer cast to work, but haven't had any luck. (I really hate function pointers!) Thanks, --Cal |
From: David M. <dav...@fi...> - 2010-11-19 23:34:57
|
It's possible that there are quite a few odd bugs like that in the PySQLRDB module. It was really just written to get SQLRelay working with Zope. It was written in 1999 or so. I maintain it, but other than update it to use CSQLRelay directly rather than PySQLRClient, I haven't done much work on it, so I'm not surprised there are unicode issues. I do test it with Zope and in standalone mode before each release, but I haven't done much testing to verify that it acts the same as other Python DB modules. There could be some quirks. There is a getNullsAsNone function in the CSQLRelay API already though, I'm surprised you had to add one. I would appreciate any patches you have for the DB module though. I'd be happy to incorporate them into CVS, assuming they don't break Zope compatibility. David Muse dav...@fi... On 11/12/2010 05:23 PM, Axel Hansen wrote: > Hi everyone, > > I've recently set up sql relay to use for connection pooling and > read/write routing for two mysql databases. I have a web application > in python that used to use MySQLdb for cursors and to connect. I > switched my code over to use PySQLRDB, which also implements the > python DB api. PySQLRDB is acting unexpectedly though. I had to add > a call to CSQLRelay by hand to get it to return None values for NULL > fields (which still doesn't work perfectly), and fetchone() would > return a false row with 0s when nothing was returned from a SELECT > (even though fetchall would return an empty array). My biggest > problem though is getting unicode support, which MySQLdb cursors did > very well. I've modified PySQLRDB's getRow to check if any of the > columns are strings and then convert them to unicode, but I'll have to > be a bit more sophisticated to deal with the actual column type (for > example, binary data should not be converted to ascii). > > My question is, has anyone else dealt with these kinds of problems and > is the approach I'm taking (modifying PySQLRDB to fix/change its > behavior) the best solution? I keep finding new kinds of problems > where the difference in behavior of the cursor introduces a new bug, > and I don't want to keep patching those with little hacks to the cursor. > > Thanks! > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: Axel H. <axe...@gm...> - 2010-11-12 22:24:03
|
Hi everyone, I've recently set up sql relay to use for connection pooling and read/write routing for two mysql databases. I have a web application in python that used to use MySQLdb for cursors and to connect. I switched my code over to use PySQLRDB, which also implements the python DB api. PySQLRDB is acting unexpectedly though. I had to add a call to CSQLRelay by hand to get it to return None values for NULL fields (which still doesn't work perfectly), and fetchone() would return a false row with 0s when nothing was returned from a SELECT (even though fetchall would return an empty array). My biggest problem though is getting unicode support, which MySQLdb cursors did very well. I've modified PySQLRDB's getRow to check if any of the columns are strings and then convert them to unicode, but I'll have to be a bit more sophisticated to deal with the actual column type (for example, binary data should not be converted to ascii). My question is, has anyone else dealt with these kinds of problems and is the approach I'm taking (modifying PySQLRDB to fix/change its behavior) the best solution? I keep finding new kinds of problems where the difference in behavior of the cursor introduces a new bug, and I don't want to keep patching those with little hacks to the cursor. Thanks! |
From: David M. <dav...@fi...> - 2010-10-07 19:55:23
|
I'm not really sure. The last time I played with it was a long time ago. I believe it comes with the client libraries, so you should be able to. It may or may not come with the header files needed to compile against it though. There's no way to know except to try. Dave dav...@fi... On 10/07/2010 11:57 AM, Sébastien BROCHET wrote: > Hello, > > I'm using sqlrelay with oracle client 9.x. I want to setup another > station in order to test any script. Could i use Oracle Express (XE) > to compile Oracle support in SQLRelay ? > > Thanks for your answers. > > SB > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |