sqlrelay-discussion Mailing List for SQL Relay (Page 49)
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: Gena01 <ge...@gm...> - 2005-12-09 21:08:09
|
I just pulled the latest CVS code as anonymous user and tried compiling and it's breaking for me. The first thing was changes to rudiments, which I pulled separately. Now I am stuck. I am getting: g++ -Wall -pipe -o .libs/query .libs/query.o -L/home/gennady/sqlrelay-cvs/sqlrelay/src/util /home/gennady/sqlrelay-cvs/sqlrelay/src/util/.libs/libsqlrutil.so -L/usr/local/firstworks/lib -L/usr/kerberos/lib -L/home/gennady/sqlrelay-cvs/sqlrelay/src/api/c++/src /usr/local/firstworks/lib/libsqlrclient.so /usr/local/firstworks/lib/librudiments.so -lpthread -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -lz -lrt -lcrypt -ldl -Wl,--rpath -Wl,/usr/local/firstworks/lib .libs/query.o(.text+0x3a3): In function `main': : undefined reference to `sqlrconnection::sqlrconnection[in-charge](char const*, unsigned short, char const*, char const*, char const*, int, int)' .libs/query.o(.text+0x3ff): In function `main': : undefined reference to `sqlrcursor::setResultSetBufferSize(unsigned long long)' .libs/query.o(.text+0x4b0): In function `main': : undefined reference to `sqlrcursor::getField(unsigned long long, unsigned)' collect2: ld returned 1 exit status make[2]: *** [query] Error 1 Gena01 |
|
From: Gena01 <ge...@gm...> - 2005-12-09 18:37:48
|
Oops.. just saw that I didn't say that I was running it against Oracle
8.1server.
Gena01
On 12/9/05, Gena01 <ge...@gm...> wrote:
>
> Hi David,
>
> Thanks for the commit. I got 2 more fixes in the attached patch/diff file=
:
> 1. Fixed execute() it was returning the wrong thing and breaking stuff.
> Couldn't do $res->fetchRow() since $res was the wrong object.
> 2. Added support for & and ? per oci8 driver.
>
> NOTE: Please review the big patch for & and ? carefully since it was
> mostly a hack on my part. I might have done some things wrong.
>
> P.S. Now my problem is as following:
> - I got the prepared stuff to work. But my connection was dying. I had to
> enable debugging to get any info. Also weird that it didn't try to create=
a
> new connection once the old one died. Or is there a fixed version since
> 0.36.4?
> - Once I got the debug going I looked at the end of the file and saw it
> was runing out of cursors.
> - I increased it from 5 to 50 and restarted. Now each connection was
> taking up 500Megs of virtual memory. Is there anyway to lower that number=
? I
> changed it down to 10 cursors for now, but it would be nicer to get the
> memory usage down somehow. It just seems like such an overkill. But what =
do
> I know....
>
> Gena01
>
> On 12/9/05, David Muse <dav...@fi...> wrote:
> >
> > Thanks for the fix, I just committed it to CVS. You're right, it shoul=
d
> > be this->$connection. Odd though, that it always worked for me without
> > that fix. I guess I never called a function that needed
> > this->$connection to be set in the cursor after running a query :/
> >
> > Here's how I run prepared statements in my test programs:
> >
> > Bind by name:
> > $res=3D$db->prepare("insert into testtable values
> > (:var1,:var2,:var3,:var4,:var5)");
> > $bindvars=3Darray("var1" =3D> 2,
> > "var2" =3D> "testchar2",
> > "var3" =3D> "testvarchar2",
> > "var4" =3D> "01-JAN-2002",
> > "var5" =3D> "testlong2");
> > $res=3D$db->execute($res,$bindvars);
> >
> > or
> >
> > Bind by position:
> > $res=3D$db->prepare("insert into testtable values
> > (:var1,:var2,:var3,:var4,:var5)");
> > $bindvars=3Darray("1" =3D> 2,
> > "2" =3D> "testchar2",
> > "3" =3D> "testvarchar2",
> > "4" =3D> "01-JAN-2002",
> > "5" =3D> "testlong2");
> > $res=3D$db->execute($res,$bindvars);
> >
> > Note the colon-delimited bind variables. Some databases support bind
> > variables natively (oracle, sybase, msssql server, interbase, db2 and
> > postgresql) and for those databases, sqlrelay uses the native bind
> > syntax. Ie, for sybase/mssqlserver, the query should look like:
> >
> > insert into testtable values (@var1,@var2,@var3,@var4)
> >
> > for DB2:
> >
> > insert into testtable values (?,?,?,?)
> >
> > For databases that don't support bind variables natively, SQL Relay
> > fakes them by rewriting the query. For those databases, you have to us=
e
> > colon-delimited bind variables.
> >
> > MySQL 4.1 (I think) and 5.0 (for sure) support bind variables natively
> > as well, but SQL Relay doesn't yet use those features, so for now, when
> > using mysql, SQL Relay still fakes bind variables. I belive MySQL
> > uses ?'s to denote bind variables, so eventually, when SQL Relay
> > supports native bind variables with MySQL, you'll be able to write
> > queries like:
> >
> > insert into testtable values (?,?,?,?)
> >
> > but for now you have to use colon-delimited names.
> >
> > Hope this helps,
> >
> > David Muse
> > dav...@fi...
> >
> > On Fri, 2005-12-09 at 11:19 -0500, Gena01 wrote:
> > > I found out about SQLRelay recently. So I tried to set it up and get
> > > our stuff running against it. I grabbed the latest stable release fro=
m
> > > download section. It seems that the Pear driver for SQL relay in 26.4
> > > is quite buggy. So i went and pulled the code from cvs. There are
> > > still some bugs in that code that I found and fixed in my copy.
> > >
> > > Specifically:
> > >
> > > function prepare($query)
> > > {
> > > $cursor =3D sqlrcur_alloc($this->connection);
> > > sqlrcur_setResultSetBufferSize($cursor,100);
> > > sqlrcur_prepareQuery($cursor, $query);
> > > return new DB_sqlrelay_cursor($cursor,$connection); <--- no
> > > such variable, should be $this->connection
> > > }
> > >
> > >
> > > What do I need to do to get Prepared Statements to work. Esp in Pear
> > > the ones that look like
> > > SELECT a
> > > FROM table
> > > WHERE id =3D ?
> > >
> > > Thank you,
> > >
> > > Gena01
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
> > _______________________________________________
> > Sqlrelay-discussion mailing list
> > Sql...@li...
> > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
> >
>
>
>
|
|
From: David M. <dav...@fi...> - 2005-12-09 18:15:57
|
Thanks for the fix, I just committed it to CVS. You're right, it should
be this->$connection. Odd though, that it always worked for me without
that fix. I guess I never called a function that needed
this->$connection to be set in the cursor after running a query :/
Here's how I run prepared statements in my test programs:
Bind by name:
$res=$db->prepare("insert into testtable values
(:var1,:var2,:var3,:var4,:var5)");
$bindvars=array("var1" => 2,
"var2" => "testchar2",
"var3" => "testvarchar2",
"var4" => "01-JAN-2002",
"var5" => "testlong2");
$res=$db->execute($res,$bindvars);
or
Bind by position:
$res=$db->prepare("insert into testtable values
(:var1,:var2,:var3,:var4,:var5)");
$bindvars=array("1" => 2,
"2" => "testchar2",
"3" => "testvarchar2",
"4" => "01-JAN-2002",
"5" => "testlong2");
$res=$db->execute($res,$bindvars);
Note the colon-delimited bind variables. Some databases support bind
variables natively (oracle, sybase, msssql server, interbase, db2 and
postgresql) and for those databases, sqlrelay uses the native bind
syntax. Ie, for sybase/mssqlserver, the query should look like:
insert into testtable values (@var1,@var2,@var3,@var4)
for DB2:
insert into testtable values (?,?,?,?)
For databases that don't support bind variables natively, SQL Relay
fakes them by rewriting the query. For those databases, you have to use
colon-delimited bind variables.
MySQL 4.1 (I think) and 5.0 (for sure) support bind variables natively
as well, but SQL Relay doesn't yet use those features, so for now, when
using mysql, SQL Relay still fakes bind variables. I belive MySQL
uses ?'s to denote bind variables, so eventually, when SQL Relay
supports native bind variables with MySQL, you'll be able to write
queries like:
insert into testtable values (?,?,?,?)
but for now you have to use colon-delimited names.
Hope this helps,
David Muse
dav...@fi...
On Fri, 2005-12-09 at 11:19 -0500, Gena01 wrote:
> I found out about SQLRelay recently. So I tried to set it up and get
> our stuff running against it. I grabbed the latest stable release from
> download section. It seems that the Pear driver for SQL relay in 26.4
> is quite buggy. So i went and pulled the code from cvs. There are
> still some bugs in that code that I found and fixed in my copy.
>
> Specifically:
>
> function prepare($query)
> {
> $cursor = sqlrcur_alloc($this->connection);
> sqlrcur_setResultSetBufferSize($cursor,100);
> sqlrcur_prepareQuery($cursor, $query);
> return new DB_sqlrelay_cursor($cursor,$connection); <--- no
> such variable, should be $this->connection
> }
>
>
> What do I need to do to get Prepared Statements to work. Esp in Pear
> the ones that look like
> SELECT a
> FROM table
> WHERE id = ?
>
> Thank you,
>
> Gena01
|
|
From: Gena01 <ge...@gm...> - 2005-12-09 16:19:45
|
I found out about SQLRelay recently. So I tried to set it up and get our
stuff running against it. I grabbed the latest stable release from download
section. It seems that the Pear driver for SQL relay in 26.4 is quite buggy=
.
So i went and pulled the code from cvs. There are still some bugs in that
code that I found and fixed in my copy.
Specifically:
function prepare($query)
{
$cursor =3D sqlrcur_alloc($this->connection);
sqlrcur_setResultSetBufferSize($cursor,100);
sqlrcur_prepareQuery($cursor, $query);
return new DB_sqlrelay_cursor($cursor,$connection); <--- no such
variable, should be $this->connection
}
What do I need to do to get Prepared Statements to work. Esp in Pear the
ones that look like
SELECT a
FROM table
WHERE id =3D ?
Thank you,
Gena01
|
|
From: Maciej W. <mac...@co...> - 2005-12-09 08:57:44
|
Hi!
> This is intentional, the idea is that if the network hiccups or a
> load-balanced database server goes down, the SQL Relay server will
> recover and, aside from a pause, it will appear as if nothing happened
> to the clients.
I understand it, but I think my problem is different. Or maybe I'm wrong?
My program runs as follows:
import com.firstworks.sqlrelay.SQLRConnection;
import com.firstworks.sqlrelay.SQLRCursor;
//loop three times
for (int a=0; a<=3; a++){
SQLRConnection conn = new SQLRConnection(host, port, socket, user, pwd, 0, 1);
System.out.println("ping"+conn.ping()+". ");
if (conn.ping()){
System.out.println("OK");
}
else{
SQLRCursor cur=new SQLRCursor(conn);
cur.getNullsAsNulls();
String query = "select xxx from xyz";
cur.sendQuery(query);
System.out.println("rowcount:"+cur.rowCount());
}
}
Today morning (after database backup at night) I've started my program
and the result was:
ping false. rowcount:1
ping false. rowcount:1
ping false. rowcount:1
Then I've started this program again and the result was:
ping true. OK
ping true. OK
ping true. OK
It seems that SQLRelay is connected to database because sendQuery
returns some results but ping returns false (bug?).
When whole program is executed for the second time (but not in the
second loop run) everything starts to work correctly.
As far as I've checked this, in python there are no such problems, and
ping returns true even in the first run.
---
Maciej Wisniowski
|
|
From: <jh...@ha...> - 2005-12-05 08:21:02
|
Hi
I am working on setting up an multithreaded application with below os &
library.
OS: linux fc3
Compiler: gcc 3.4.2 20041017
Mysql-4.1.15
Rudiments-0.28.2
Sqlrelay-0.36.4
For stress test. Concurrent 50 transaction loop 1000000 count.
One day after, our application abnormal terminationtion with dump.
50 x 2856 transaction succeded.
Below, gdb bactrace result.
Any ideas? Whats it looking for?
Thanks!
***************************************************
(gdb) bt
#0 0x001b04dc in memcpy () from /lib/tls/libc.so.6
#1 0xf6e3869c in rudiments::rawbuffer::copy ()
from /usr/local/firstworks/lib/librudiments-0.28.2.so.1
#2 0xf6e1be1c in rudiments::filedescriptor::bufferedRead ()
from /usr/local/firstworks/lib/librudiments-0.28.2.so.1
#3 0xf6e1b720 in rudiments::filedescriptor::read ()
from /usr/local/firstworks/lib/librudiments-0.28.2.so.1
#4 0xf6fb8233 in sqlrcursor::getString ()
from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
#5 0xf6fb91fb in sqlrcursor::parseOutputBinds ()
from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
#6 0xf6fb77a7 in sqlrcursor::processResultSet ()
from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
#7 0xf6fb637c in sqlrcursor::runQuery ()
from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
#8 0xf6fb5aff in sqlrcursor::executeQuery ()
from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
#9 0xf6fb59e3 in sqlrcursor::sendQuery ()
from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
#10 0x08057e3b in CPxDB::get_contents (this=0x8bda688, aQuery=
{static npos = 4294967295, _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0xc90f5034 "select Contents from ContentsTbl where Id in ('7975a859-
1c30-a8d3-f807-3ade5511da7a','11d36c03-9978-02a6-126d-
be5f2385b81e','51627791-31ed-69e2-4a62-0a9966749997','c5e7087a-4ba3-83ea-
71c4-10bca8059919"...}}, contents=@0x8f5723e0)
at src/PxDB.cpp:167
#11 0x0804cd99 in CPxThread::contents (this=0x8bdb088) at
src/PxThread.cpp:424
#12 0x0804c222 in CPxThread::transaction (this=0x8bdb088)
at src/PxThread.cpp:228
#13 0x0804be98 in CPxThread::responder (th_arg=0x8bdb088)
at src/PxThread.cpp:150
#14 0x0038b1d5 in start_thread () from /lib/tls/libpthread.so.0
#15 0x0020c2da in clone () from /lib/tls/libc.so.6
|
|
From: Guo, J. <Jin...@pa...> - 2005-12-02 16:27:32
|
David, Sometimes, one of connection processes stop responding. In log file I = can see it stop at waiting for client to close the connection... I guess = it is because client quits abnormally. Is there any way to avoid this? = Thanks. -----Original Message----- From: sql...@li... [mailto:sql...@li...]On Behalf Of D.Aguilera Sent: December 1, 2005 11:51 AM To: sql...@li... Subject: [Sqlrelay-discussion] Access To SQLRelay from Python in windows Hi, I'm currently using sqlrelay installed in a Linux box. In the same box I installed the python api to access sqlrelay from=20 mod_python and nevow. ( same box also ). What I need now is to access sqlrelay from python inWindows XP. I've=20 checked the code and there's a dependency on a library... CSQLRelay.so=20 to make the api work. Is there any dll or pyd available for windows? Tks ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log = files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: D.Aguilera <ba...@sm...> - 2005-12-01 16:48:35
|
Hi, I'm currently using sqlrelay installed in a Linux box. In the same box I installed the python api to access sqlrelay from mod_python and nevow. ( same box also ). What I need now is to access sqlrelay from python inWindows XP. I've checked the code and there's a dependency on a library... CSQLRelay.so to make the api work. Is there any dll or pyd available for windows? Tks |
|
From: David M. <dav...@fi...> - 2005-11-30 02:57:07
|
Interesting. I haven't seen that error before. My development version of SQL Relay compiled cleanly on solaris 10 last time I tried, but I haven't recently tried. It's possible that there are bugs in 0.36.4 or the current version of rudiments. It almost looks like libc and libdl aren't being linked in though. Is your g++ up-to-date, or are you running an older version? Also, run "nm /usr/lib/libdl.so | grep dlclose" and send me the result. Actually, libdl.so may be in /lib and may be something like libdl.so.0.1.2 or something like that. In the mean time, I'll see if I can get solaris 10 x86 running again and see if I can reproduce the problem. Dave dav...@fi... On Mon, 2005-11-21 at 14:50 +1200, Gene Thomas wrote: > I'm having problems building sqlrelay on SunOS 5.10, I'm planning on > using Python and Orcale on SunOS 5.10. > > 1) If one wants to use the 32 bit Oracle 9i libraries the configure > script needs to be changed: > sed -e 's!ORACLE_HOME/lib!ORACLE_HOME/lib32!g' <configure > >configure.fixed > > 2) The rudiments library ha some peculiar undefeind references: > > [//gthomas@allan1-mmx30build~/my-dev/sqlrelay-0.36.4] > > gmake > gmake -C src all > gmake[1]: Entering directory > `/home/users/gthomas/my-dev/sqlrelay-0.36.4/src' > gmake -C util all > gmake[2]: Entering directory > `/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util' > gmake[2]: Nothing to be done for `all'. > gmake[2]: Leaving directory > `/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util' > gmake -C listener all > gmake[2]: Entering directory > `/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/listener' > /bin/sh ../../libtool --mode=link g++ -o sqlr-listener sqlrlistener.lo > main.lo -L../../src/util -lsqlrutil -L/usr/local/firstworks/lib > -lrudiments -lsocket -lpthread -L/usr/sfw/lib -lssl -L/usr/sfw/lib > -lcrypto -lrt -lrt -lrt -ldl > g++ -o .libs/sqlr-listener .libs/sqlrlistener.o .libs/main.o > -L/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util > /home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util/.libs/libsqlrutil.so > -L/usr/local/firstworks/lib -L/usr/sfw/lib > /usr/local/firstworks/lib/librudiments.so -lsocket -lpthread -lssl > -lcrypto -lrt -ldl -Wl,--rpath -Wl,/usr/local/firstworks/lib > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `dlclose@SISCD_2.3' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `write@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `dlsym@SISCD_2.3' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `dlopen@SISCD_2.3' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `open@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `tcdrain@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `waitpid@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `sigprocmask@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `fcntl@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `select@SUNW_1.2' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `setitimer@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `close@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `dlerror@SISCD_2.3' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `sigsuspend@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `read@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `msync@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `fork@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `fsync@SUNW_0.9' > /usr/local/firstworks/lib/librudiments.so: undefined reference to > `sigaction@SUNW_0.9' > collect2: ld returned 1 exit status > gmake[2]: *** [sqlr-listener] Error 1 > gmake[2]: Leaving directory > `/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/listener' > gmake[1]: *** [all] Error 2 > gmake[1]: Leaving directory `/home/users/gthomas/my-dev/sqlrelay-0.36.4/src' > gmake: *** [all] Error 2 > > yet > > [//gthomas@allan1-mmx30build~/my-dev/sqlrelay-0.36.4] > > nm /usr/local/firstworks/lib/librudiments.so | grep dlclose > U dlclose > > indicates nothing unusual. > > Has anyone had any problems like this? > > Thanks, > > Gene Thomas. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: David M. <dav...@fi...> - 2005-11-30 02:51:44
|
ping() will return true or false depending on whether SQL Relay is
connected to the backend database or not. Ie. the client will connect
to SQL Relay, check the status of the database and disconnect. But, if
the database is down and you run a query, the client will remain
connected to the SQL Relay server until the server comes back up, at
which point the query will be run against the now-up database.
This is intentional, the idea is that if the network hiccups or a
load-balanced database server goes down, the SQL Relay server will
recover and, aside from a pause, it will appear as if nothing happened
to the clients.
David Muse
dav...@fi...
On Wed, 2005-11-23 at 09:04 +0100, Maciej Wisniowski wrote:
> Hi!
>
> I have a simple web service written in java, that gets data from
> database using SQLRelay. The problem is with ping command.
>
> This is part of my code:
>
> import com.firstworks.sqlrelay.SQLRConnection;
> import com.firstworks.sqlrelay.SQLRCursor;
>
> if (conn.ping()){
> ...do something...
> }
>
> The database I'm connecting to is backuped every night and swithed down
> for a while and possibly this causes problem. Every morning I'm receiving
> 'false' from ping() command, but... when I'm trying to send query even
> when ping
> returns 'false' it executes correctly... I did something like this:
>
> if (conn.ping()){
> ...do something...
> }
> else{
> SQLRCursor cur=new SQLRCursor(conn);
> cur.getNullsAsNulls();
>
> String query = "SELECT * from table";
> cur.sendQuery(query);
> System.out.println("ping false. rowCount:"+cur.rowCount());
> }
>
>
> and rowCount() returns 1 for my select, so... connection works!
> Strangely after doing this query and starting my program again ping
> returns 'true'... till next morning.
>
> I think it's possibly a bug with ping() in java code...?
>
|
|
From: David M. <dav...@fi...> - 2005-11-30 02:45:42
|
On Wed, 2005-11-23 at 12:10 +0000, David Edwards wrote: > Hi Dave, > > I think that C vs Perl is quite likely to be the issue, unless it's simply > the overhead of communication via the SQL Relay listener. Our DB runs on > different servers, and we are running SQL Relay on our web servers. The > reason for this is that we wanted to use SQL Relay to pool connections to > two DB servers - a Read/Write master and a Read Only slave. Two instances of > SQL Relay would be set up on each of our four web servers, allowing us to > choose a R/W or R/O connection from our code, based on the type of queries > to be executed. We can then tweak the load across the DB servers to match > the ratio of R/W and R/O load by altering the number of R/O connections we > open to the master. > > Would it be more efficient to run SQL Relay on one of the DB servers > instead? That's one of those application-specific things. It's generally most efficient to run SQL Relay on a middle tier between the web servers and database servers, where many web server machines talk to a few (or just one) SQL Relay machines which in turn distribute load over multiple backed database servers. However, there are cases where that's overkill and it ends up being more efficient to run SQL Relay directly on the web or database tier. It's generally more efficient to run SQL Relay on the database tier than on the web tier, but again, that can vary with the application. In the end, you have to experiment with it. > > We're using the following as one of our DBI connection strings: > > DBI:SQLRelay:host=localhost;port=3307;socket=/tmp/sqlrelay-ro.socket > > And the following as the corresponding SQLRelay instance tag: > > <instance id="readonly" port="3307" socket="/tmp/sqlrelay-ro.socket" > dbase="mysql" connections="5" maxconnections="30" maxqueuelength > ="5" growby="1" ttl="60" endofsession="commit" sessiontimeout="600" > runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" > handoff="pass" den > iedips="" allowedips="" debug="none"> This looks good, you're using the unix socket to talk to SQL Relay. If you try running SQL Relay on the database tier, make sure you use the "local connection" to talk to the database too. See http://sqlrelay.sourceforge.net/sqlrelay/tuning.html for details. > > To migrate our code to SQL Relay, we're currently using the SQL Relay DBI > driver, but once we've refactored all our code to use our new wrapper, we > can rewrite the wrapper to use the standard SQL Relay API. Perhaps we'll see > a perforamnce increase then? You'll probably see at least a minor improvement. Plus, there are a few tweaks that you can use from the native API that you can't access through the DBI driver. Again, see http://sqlrelay.sourceforge.net/sqlrelay/tuning.html for details. > David > > -----Original Message----- > From: Firstworks/4access [mailto:dav...@fi...] > Sent: 16 November 2005 17:10 > To: sql...@li... > Subject: Re: [Sqlrelay-discussion] DBI Performance > > > If I'm not mistaken, the MySQL DBI driver is written in C, while the SQL > Relay DBI driver is written in perl. It's possible that could account > for the difference. The DBI driver should use the socket parameter. > What connect string are you using? Also, is SQL Relay running on the > same machine as the database? If so, are you sure it's configured to > use the unix socket? > > Dave > dav...@fi... > > On Wed, 2005-11-09 at 10:07 +0000, David Edwards wrote: > > Thanks, David. Looking forward to 0.37! > > > > On a slightly different topic, I have briefly tried benchmarking the SQL > > Relay DBI driver against the standard MySQL DBI driver. Obviously there > are > > a huge number of variables involved - I am running SQL Relay locally on > our > > web server connecting to a DB on a different machine, for example - but I > > was surprised to find SQL Relay marginally slower. On average, > transactions > > via SQL relay took 0.16 secs vs 0.13 secs direct. I was hoping for a > slight > > improvement through connection pooling. Are there any tweaks I could try > not > > listed on your performance tuning page? Does the socket parameter get used > > by the DBI driver? Or would I be best off rewriting my DB wrapper to use > the > > SQL Relay API directly rather than via DBI? > > > > David > > > > -----Original Message----- > > From: David Muse [mailto:dav...@fi...] > > Sent: 08 November 2005 04:04 > > To: sql...@li... > > Subject: RE: [Sqlrelay-discussion] Perl compilation error with 0.36.4 > > > > > > Hmmm, I'll have to look into that a bit deeper. Adding a $ in front > > will have the effect of requiring the 3rd argument to be the string > > "SQLRelay::SQL_CLOB" to bind a clob. I'm not sure that's right, but if > > you don't use clob's then go with it :) > > > > I'll figure out what's what though and fix it in the 0.37 release. > > > > Dave > > dav...@fi... > > > > On Fri, 2005-11-04 at 15:03 +0000, David Edwards wrote: > > > Hi David, > > > > > > Thanks for replying. I've tried the replacement file, but still got the > > same > > > compilation error. I did try inserting a $ in front of > > > DBD::SQLRelay::SQL_CLOB and DBD::SQLRelay::SQL_BLOB on lines 282 and > 294, > > > and this did get rid of the compilation error. However, I don't know > > whether > > > the resulting code does what it's supposed to do, because I'm not using > > > CLOBs or BLOBs. > > > > > > Regards, > > > > > > David > > > > > > -----Original Message----- > > > From: Firstworks/4access [mailto:dav...@fi...] > > > Sent: 04 November 2005 14:48 > > > To: sql...@li... > > > Subject: Re: [Sqlrelay-discussion] Perl compilation error with 0.36.4 > > > > > > > > > Hmm, looks like DBD::SQLReay::SQL_CLOB and SQL_BLOB aren't defined. Try > > > replacing /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm with the > > > attached file and see if it works. > > > > > > David Muse > > > dav...@fi... > > > > > > On Thu, 2005-11-03 at 10:56 +0000, David Edwards wrote: > > > > I am trying to use SQL Relay via the DBI driver from a simple Perl > > script, > > > > but have run into a problem. On our development environment - using > SQL > > > > Relay 0.33.1 - we have no problems. However, using SQL Relay 0.36.4 on > > our > > > > production environment, trying to run the same script results in the > > > > following Perl error: > > > > > > > > install_driver(SQLRelay) failed: Bareword "DBD::SQLRelay::SQL_CLOB" > not > > > > allowed while "strict subs" in use at > > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 282. > > > > Bareword "DBD::SQLRelay::SQL_BLOB" not allowed while "strict subs" in > > use > > > at > > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 282. > > > > Bareword "DBD::SQLRelay::SQL_CLOB" not allowed while "strict subs" in > > use > > > at > > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 294. > > > > Bareword "DBD::SQLRelay::SQL_BLOB" not allowed while "strict subs" in > > use > > > at > > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 294. > > > > Compilation failed in require at (eval 4) line 3. > > > > > > > > Is this an issue with our Perl, or a problem with the SQL Relay code? > If > > > the > > > > former, does anyone have any suggestions as to how to solve the > problem? > > > > > > > > Thanks, > > > > > > > > David > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > SF.Net email is sponsored by: > > > > Tame your development challenges with Apache's Geronimo App Server. > > > Download > > > > it for free - -and be entered to win a 42" plasma tv or your very own > > > > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > > > > _______________________________________________ > > > > Sqlrelay-discussion mailing list > > > > Sql...@li... > > > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by: > > > Tame your development challenges with Apache's Geronimo App Server. > > Download > > > it for free - -and be entered to win a 42" plasma tv or your very own > > > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > > > _______________________________________________ > > > Sqlrelay-discussion mailing list > > > Sql...@li... > > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: > > Tame your development challenges with Apache's Geronimo App Server. > Download > > it for free - -and be entered to win a 42" plasma tv or your very own > > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: > > Tame your development challenges with Apache's Geronimo App Server. > Download > > it for free - -and be entered to win a 42" plasma tv or your very own > > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > This e-mail is only intended for the person(s) to whom it is addressed and > may contain confidential information. LB Icon does not accept responsibility > for any loss or damage caused by this email or any attachments. Unless > clearly stated to the contrary, any opinions or comments are personal to the > writer and are not made on behalf of LB Icon. If you have received this > e-mail in error, please notify us immediately at in...@lb... and then > delete this message from your system. Please do not copy it or use it for > any purposes, or disclose its contents to any other person. Thank you for > your co-operation. > > LB Icon is the business name of Aspect Internet Holdings Limited, Aspect > Technologies Limited, LB Icon Limited, Object 1 Limited and Escador Limited. > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: David M. <dav...@fi...> - 2005-11-30 02:11:31
|
Hmmm, The sqlr-listener starts up, and then each sqlr-connection process registers itself with the listener. The have to take turns registering, so each sqlr-connection waits on a semaphore (the announce mutex) for it's turn. Are all of the sqlr-connection's in that state? One of them should have successfully acquired the mutex unless the sqlr-listener isn't running. See if the sqlr-listener isn't running. If it is running, look through the logs and see if one of the sqlr-connections did in fact acquire the announce mutex, but hasn't get released it. If you find a case of that, send me the log for that connection. Are you by any chance running on a virtual server? David Muse dav...@fi... On Wed, 2005-11-23 at 14:50 -0600, Guo, Jinnan wrote: > Dave, > > After some investigation, I found that if I increase the connection number to 40, the connection process is stopped at "Waiting for client...". Thanks > > -----Original Message----- > From: Guo, Jinnan > Sent: November 22, 2005 06:20 AM > To: 'sql...@li...' > Subject: Failed to acquire announce mutex > > > Dave, > > I setup SQLRelay with 20 connections, everything is fine. But when I tried to start 30 connections, most of the connections failed. Here is log of one of the connection process. > > .... > > 11/16/2005 20:35:48 EST connection [19181] : database is available > > 11/16/2005 20:35:48 EST connection [19181] : initializing session... > > 11/16/2005 20:35:48 EST connection [19181] : done initializing session... > > 11/16/2005 20:35:48 EST connection [19181] : announcing availability... > > 11/16/2005 20:35:48 EST connection [19181] : registering for handoff... > > 11/16/2005 20:35:48 EST connection [19181] : handoffsockname: /opt/sybase/fir > > stworks/var/sqlrelay/tmp/sockets/parsons-handoff > > 11/16/2005 20:35:48 EST connection [19181] : trying... > > 11/16/2005 20:35:48 EST connection [19181] : done registering for handoff > > 11/16/2005 20:35:48 EST connection [19181] : acquiring announce mutex > > Then, the process hang there forever. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: David M. <dav...@fi...> - 2005-11-30 01:57:46
|
This looks like maybe the rpm build process is attempting to link mysqlconnection.o and libsqlrconnection from 0.36.4 to make sqlr-connection-mysql Make sure old sqlrelay and old rudiments installations have been removed before trying to build the rpm's. Dave dav...@fi... On Sat, 2005-11-26 at 17:21 +0000, david forums wrote: > .libs/mysqlconnection.o(.text+0xec6): In function > `mysqlcursor::returnRow()': > /usr/src/redhat/BUILD/sqlrelay-0.37/src/connections/mysql/mysqlconnection.C:493: > undefined reference to `sqlrconnection::sendField(char const*, unsigned > int)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV15mysqlconnection[vtable for > mysqlconnection]+0x58): undefined reference to > `sqlrconnection::skipRows(sqlrcursor*, unsigned long long)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x10): undefined reference to > `sqlrcursor::openCursor(unsigned short)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x18): undefined reference to `sqlrcursor::prepareQuery(char > const*, unsigned int)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x20): undefined reference to > `sqlrcursor::inputBindInteger(char const*, unsigned short, long long*)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x24): undefined reference to > `sqlrcursor::inputBindDouble(char const*, unsigned short, double*, > unsigned int, unsigned int)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x28): undefined reference to `sqlrcursor::inputBindBlob(char > const*, unsigned short, char const*, unsigned int, short*)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x2c): undefined reference to `sqlrcursor::inputBindClob(char > const*, unsigned short, char const*, unsigned int, short*)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x34): undefined reference to > `sqlrcursor::outputBindInteger(char const*, unsigned short, long long*, > short*)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x38): undefined reference to > `sqlrcursor::outputBindDouble(char const*, unsigned short, double*, > unsigned int*, unsigned int*, short*)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x3c): undefined reference to > `sqlrcursor::outputBindBlob(char const*, unsigned short, unsigned short, > short*)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x40): undefined reference to > `sqlrcursor::outputBindClob(char const*, unsigned short, unsigned short, > short*)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x48): undefined reference to > `sqlrcursor::returnOutputBindBlob(unsigned short)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x4c): undefined reference to > `sqlrcursor::returnOutputBindClob(unsigned short)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x50): undefined reference to > `sqlrcursor::returnOutputBindCursor(unsigned short)' > .libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for > mysqlcursor]+0x54): undefined reference to > `sqlrcursor::checkForTempTable(char const*, unsigned int)' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::filedescriptor::read(long*) const' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::daemonprocess::checkForPidFile(char const*) const' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::file::setPositionRelativeToBeginning(long) const' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::filedescriptor::write(unsigned long) const' > /usr/lib/libsqlrutil.so: undefined reference to > `rudiments::logger::write(char const*, int, long)' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::charstring::toLong(char const*)' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::filedescriptor::read(unsigned long*) const' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::filedescriptor::bufferWrites()' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::filedescriptor::write(long) const' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::stringbuffer::append(long)' > /usr/lib/libsqlrconnection.so: undefined reference to > `rudiments::filedescriptor::dontBufferWrites()' > collect2: ld returned 1 exit status > make[3]: *** [sqlr-connection-mysql] Error 1 > make[3]: Leaving directory > `/usr/src/redhat/BUILD/sqlrelay-0.37/src/connections/mysql' > make[2]: *** [all] Error 2 > make[2]: Leaving directory > `/usr/src/redhat/BUILD/sqlrelay-0.37/src/connections' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/usr/src/redhat/BUILD/sqlrelay-0.37/src' > make: *** [all] Error 2 > erreur: Mauvais status de sortie pour /var/tmp/rpm-tmp.9371 (%build) > > > Erreur de construction de RPM: > Mauvais status de sortie pour /var/tmp/rpm-tmp.9371 (%build) > > I have nothing to had. > > Regards > > David > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: Jolan L. <jo...@pr...> - 2005-11-29 01:57:42
|
On Mon, Nov 28, 2005 at 10:22:32PM -0000, david forums wrote: > Result : > ERREUR: erreur de syntaxe sur ou pr????s de ????:???? at character 52 > Attempted Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES > (:l_id,:c_libelle,:c_id) > ERROR: syntaxic error on or close to ????:???? at character 52 Attempted > Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES > (:l_id,:c_libelle,:c_id) > > fedora core 3 or 4: > php (own compiled), version 5.0.4 > apache 2.0.54(RPM) > sqlrelay 0.36.4(RPM) - 0.37 (own compiled): both work fine on select > Postgresql 8.0.4(RPM) > > I make several trial, every time is the same error. > > Please reply as soon as possible. see http://sqlrelay.sourceforge.net/support.html for "urgent" support. |
|
From: Firstworks/4access <dav...@fi...> - 2005-11-28 23:25:21
|
Postgresql 8 supports bind variables natively and uses "$1,$2,$3" to
represent bind variables rather than ":var1,:var2,:var3". Using
colon-delimited bind variables should work when using sqlrelay-0.36.4
against postgresql 8, but when using sqlrelay-0.37 pre-releases against
postgresql 8, you have to add fakebinds=3Dyes to the connectstring in
sqlrelay.conf, for example:
<connection connectionid=3D"db"
string=3D"user=3Dtestuser;password=3Dtestpassword;db=3Dtestdb;host=3D/tmp=
;typemangling=3Dno;fakebinds=3Dyes" metric=3D"6"/>
If that doesn't take care of the problem, call sqlrcon_debugOn() before
running your insert query and post the result, I'll take a look and see
if I can spot the problem.
Dave
dav...@fi...
On Mon, 2005-11-28 at 22:43 +0000, david forums wrote:
> Hi again
>=20
> I may be start to find where the problem occur:
> It seems that it does not bind the values in the request.
>=20
> I try to execute the following request in psql :
> INSERT INTO civility (l_id,c_libelle,c_id) VALUES (:l_id,:c_libelle,:c_=
id);
> Just like that and I got :
> ERREUR: erreur de syntaxe sur ou pr=C3=83=C2=A8s de =C3=82=C2=AB:=C3=82=
=C2=BB au caract=C3=A8re 52
> LIGNE 1 : ...NSERT INTO civility (l_id,c_libelle,c_id) VALUES =20
> (:l_id,:c_l...
> ^
> So it's the same message. It is like if the inputBind were not take in =
=20
> case.
>=20
> Hope it will help
>=20
> REgards
>=20
> David
>=20
>=20
>=20
> Le Mon, 28 Nov 2005 22:22:32 -0000, david forums <df...@vi...> =
a =20
> =C3=A9crit:
>=20
> > Hi
> >
> > My table :
> > civility : c_id integer NOT NULL
> > l_id integer NOT NULL=09
> > c_libelle character varying(30) NOT NULL
> >
> >
> > my php script :
> > $con=3Dsqlrcon_alloc("localhost",9001,"/tmp/mainPostgres.socket","tes=
tPostgres","test",1,3);
> >
> > $cursor =3D sqlrcur_alloc($con);
> >
> > sqlrcur_prepareQuery($cursor, "INSERT INTO civility =20
> > (l_id,c_libelle,c_id) VALUES (:l_id,:c_libelle,:c_id)");
> > sqlrcur_inputBind($cursor,"l_id",1);
> > sqlrcur_inputBind($cursor,"c_libelle","testee");
> > sqlrcur_inputBind($cursor,"c_id",5);
> > if(!sqlrcur_executeQuery($cursor)) {
> > echo sqlrcur_errorMessage($cursor);
>=20
> > }
> > sqlrcur_free($cursor);
> > sqlrcon_free($con);
> >
> > Result :
> > ERREUR: erreur de syntaxe sur ou pr=C3=83=C2=A8s de =C3=82=C2=AB:=C3=82=
=C2=BB at character 52 =20
> > Attempted Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES =20
> > (:l_id,:c_libelle,:c_id)
> > ERROR: syntaxic error on or close to =C3=82=C2=AB:=C3=82=C2=BB at ch=
aracter 52 Attempted =20
> > Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES =20
> > (:l_id,:c_libelle,:c_id)
> >
> > fedora core 3 or 4:
> > php (own compiled), version 5.0.4
> > apache 2.0.54(RPM)
> > sqlrelay 0.36.4(RPM) - 0.37 (own compiled): both work fine on select
> > Postgresql 8.0.4(RPM)
> >
> > I make several trial, every time is the same error.
> >
> > Please reply as soon as possible.
> >
> > Regards
> >
> > David
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through lo=
g =20
> > files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUN=
K!
> > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
> > _______________________________________________
> > Sqlrelay-discussion mailing list
> > Sql...@li...
> > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
> >
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>=20
|
|
From: david f. <df...@vi...> - 2005-11-28 21:43:52
|
Hi again
I may be start to find where the problem occur:
It seems that it does not bind the values in the request.
I try to execute the following request in psql :
INSERT INTO civility (l_id,c_libelle,c_id) VALUES (:l_id,:c_libelle,:c_id);
Just like that and I got :
ERREUR: erreur de syntaxe sur ou près de «:» au caractère 52
LIGNE 1 : ...NSERT INTO civility (l_id,c_libelle,c_id) VALUES
(:l_id,:c_l...
^
So it's the same message. It is like if the inputBind were not take in
case.
Hope it will help
REgards
David
Le Mon, 28 Nov 2005 22:22:32 -0000, david forums <df...@vi...> a
écrit:
> Hi
>
> My table :
> civility : c_id integer NOT NULL
> l_id integer NOT NULL
> c_libelle character varying(30) NOT NULL
>
>
> my php script :
> $con=sqlrcon_alloc("localhost",9001,"/tmp/mainPostgres.socket","testPostgres","test",1,3);
>
> $cursor = sqlrcur_alloc($con);
>
> sqlrcur_prepareQuery($cursor, "INSERT INTO civility
> (l_id,c_libelle,c_id) VALUES (:l_id,:c_libelle,:c_id)");
> sqlrcur_inputBind($cursor,"l_id",1);
> sqlrcur_inputBind($cursor,"c_libelle","testee");
> sqlrcur_inputBind($cursor,"c_id",5);
> if(!sqlrcur_executeQuery($cursor)) {
> echo sqlrcur_errorMessage($cursor);
> }
> sqlrcur_free($cursor);
> sqlrcon_free($con);
>
> Result :
> ERREUR: erreur de syntaxe sur ou près de «:» at character 52
> Attempted Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES
> (:l_id,:c_libelle,:c_id)
> ERROR: syntaxic error on or close to «:» at character 52 Attempted
> Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES
> (:l_id,:c_libelle,:c_id)
>
> fedora core 3 or 4:
> php (own compiled), version 5.0.4
> apache 2.0.54(RPM)
> sqlrelay 0.36.4(RPM) - 0.37 (own compiled): both work fine on select
> Postgresql 8.0.4(RPM)
>
> I make several trial, every time is the same error.
>
> Please reply as soon as possible.
>
> Regards
>
> David
>
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|
|
From: david f. <df...@vi...> - 2005-11-28 21:22:45
|
Hi
My table :
civility : c_id integer NOT NULL
l_id integer NOT NULL
c_libelle character varying(30) NOT NULL
my php script :
$con=sqlrcon_alloc("localhost",9001,"/tmp/mainPostgres.socket","testPostgres","test",1,3);
$cursor = sqlrcur_alloc($con);
sqlrcur_prepareQuery($cursor, "INSERT INTO civility (l_id,c_libelle,c_id)
VALUES (:l_id,:c_libelle,:c_id)");
sqlrcur_inputBind($cursor,"l_id",1);
sqlrcur_inputBind($cursor,"c_libelle","testee");
sqlrcur_inputBind($cursor,"c_id",5);
if(!sqlrcur_executeQuery($cursor)) {
echo sqlrcur_errorMessage($cursor);
}
sqlrcur_free($cursor);
sqlrcon_free($con);
Result :
ERREUR: erreur de syntaxe sur ou près de «:» at character 52 Attempted
Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES
(:l_id,:c_libelle,:c_id)
ERROR: syntaxic error on or close to «:» at character 52 Attempted
Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES
(:l_id,:c_libelle,:c_id)
fedora core 3 or 4:
php (own compiled), version 5.0.4
apache 2.0.54(RPM)
sqlrelay 0.36.4(RPM) - 0.37 (own compiled): both work fine on select
Postgresql 8.0.4(RPM)
I make several trial, every time is the same error.
Please reply as soon as possible.
Regards
David
|
|
From: david f. <df...@vi...> - 2005-11-26 16:21:52
|
.libs/mysqlconnection.o(.text+0xec6): In function
`mysqlcursor::returnRow()':
/usr/src/redhat/BUILD/sqlrelay-0.37/src/connections/mysql/mysqlconnection.C:493:
undefined reference to `sqlrconnection::sendField(char const*, unsigned
int)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV15mysqlconnection[vtable for
mysqlconnection]+0x58): undefined reference to
`sqlrconnection::skipRows(sqlrcursor*, unsigned long long)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x10): undefined reference to
`sqlrcursor::openCursor(unsigned short)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x18): undefined reference to `sqlrcursor::prepareQuery(char
const*, unsigned int)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x20): undefined reference to
`sqlrcursor::inputBindInteger(char const*, unsigned short, long long*)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x24): undefined reference to
`sqlrcursor::inputBindDouble(char const*, unsigned short, double*,
unsigned int, unsigned int)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x28): undefined reference to `sqlrcursor::inputBindBlob(char
const*, unsigned short, char const*, unsigned int, short*)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x2c): undefined reference to `sqlrcursor::inputBindClob(char
const*, unsigned short, char const*, unsigned int, short*)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x34): undefined reference to
`sqlrcursor::outputBindInteger(char const*, unsigned short, long long*,
short*)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x38): undefined reference to
`sqlrcursor::outputBindDouble(char const*, unsigned short, double*,
unsigned int*, unsigned int*, short*)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x3c): undefined reference to
`sqlrcursor::outputBindBlob(char const*, unsigned short, unsigned short,
short*)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x40): undefined reference to
`sqlrcursor::outputBindClob(char const*, unsigned short, unsigned short,
short*)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x48): undefined reference to
`sqlrcursor::returnOutputBindBlob(unsigned short)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x4c): undefined reference to
`sqlrcursor::returnOutputBindClob(unsigned short)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x50): undefined reference to
`sqlrcursor::returnOutputBindCursor(unsigned short)'
.libs/mysqlconnection.o(.gnu.linkonce.d._ZTV11mysqlcursor[vtable for
mysqlcursor]+0x54): undefined reference to
`sqlrcursor::checkForTempTable(char const*, unsigned int)'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::filedescriptor::read(long*) const'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::daemonprocess::checkForPidFile(char const*) const'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::file::setPositionRelativeToBeginning(long) const'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::filedescriptor::write(unsigned long) const'
/usr/lib/libsqlrutil.so: undefined reference to
`rudiments::logger::write(char const*, int, long)'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::charstring::toLong(char const*)'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::filedescriptor::read(unsigned long*) const'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::filedescriptor::bufferWrites()'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::filedescriptor::write(long) const'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::stringbuffer::append(long)'
/usr/lib/libsqlrconnection.so: undefined reference to
`rudiments::filedescriptor::dontBufferWrites()'
collect2: ld returned 1 exit status
make[3]: *** [sqlr-connection-mysql] Error 1
make[3]: Leaving directory
`/usr/src/redhat/BUILD/sqlrelay-0.37/src/connections/mysql'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/usr/src/redhat/BUILD/sqlrelay-0.37/src/connections'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/sqlrelay-0.37/src'
make: *** [all] Error 2
erreur: Mauvais status de sortie pour /var/tmp/rpm-tmp.9371 (%build)
Erreur de construction de RPM:
Mauvais status de sortie pour /var/tmp/rpm-tmp.9371 (%build)
I have nothing to had.
Regards
David
|
|
From: david f. <df...@vi...> - 2005-11-26 16:07:02
|
I got the folowing error with 0.36.4 version, with pear module working. Fatal error: Uncaught exception 'Exception' with message 'DB Error: unknown error [nativecode=ERREUR: erreur de syntaxe sur ou près de «Monsieur» at character 56 Attempted Query: INSERT INTO civility (l_id,c_libelle,c_id) VALUES (:l_id,:c_libelle,:c_id)] I got the same message with all binds request. I have 2 computer on one the same script work fine but not with the other. It seems that I did not have the same sqlrelay version on both. Please help Regards David |
|
From: Guo, J. <Jin...@pa...> - 2005-11-23 20:55:10
|
Dave, After some investigation, I found that if I increase the connection = number to 40, the connection process is stopped at "Waiting for = client...". Thanks -----Original Message----- From: Guo, Jinnan=20 Sent: November 22, 2005 06:20 AM To: 'sql...@li...' Subject: Failed to acquire announce mutex Dave, I setup SQLRelay with 20 connections, everything is fine. But when I = tried to start 30 connections, most of the connections failed. Here is = log of one of the connection process. .... 11/16/2005 20:35:48 EST connection [19181] : database is available 11/16/2005 20:35:48 EST connection [19181] : initializing session... 11/16/2005 20:35:48 EST connection [19181] : done initializing = session... 11/16/2005 20:35:48 EST connection [19181] : announcing availability... 11/16/2005 20:35:48 EST connection [19181] : registering for handoff... 11/16/2005 20:35:48 EST connection [19181] : handoffsockname: = /opt/sybase/fir stworks/var/sqlrelay/tmp/sockets/parsons-handoff 11/16/2005 20:35:48 EST connection [19181] : trying... 11/16/2005 20:35:48 EST connection [19181] : done registering for = handoff 11/16/2005 20:35:48 EST connection [19181] : acquiring announce mutex Then, the process hang there forever. |
|
From: David E. <dav...@lb...> - 2005-11-23 12:10:44
|
Hi Dave, I think that C vs Perl is quite likely to be the issue, unless it's simply the overhead of communication via the SQL Relay listener. Our DB runs on different servers, and we are running SQL Relay on our web servers. The reason for this is that we wanted to use SQL Relay to pool connections to two DB servers - a Read/Write master and a Read Only slave. Two instances of SQL Relay would be set up on each of our four web servers, allowing us to choose a R/W or R/O connection from our code, based on the type of queries to be executed. We can then tweak the load across the DB servers to match the ratio of R/W and R/O load by altering the number of R/O connections we open to the master. Would it be more efficient to run SQL Relay on one of the DB servers instead? We're using the following as one of our DBI connection strings: DBI:SQLRelay:host=localhost;port=3307;socket=/tmp/sqlrelay-ro.socket And the following as the corresponding SQLRelay instance tag: <instance id="readonly" port="3307" socket="/tmp/sqlrelay-ro.socket" dbase="mysql" connections="5" maxconnections="30" maxqueuelength ="5" growby="1" ttl="60" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" den iedips="" allowedips="" debug="none"> To migrate our code to SQL Relay, we're currently using the SQL Relay DBI driver, but once we've refactored all our code to use our new wrapper, we can rewrite the wrapper to use the standard SQL Relay API. Perhaps we'll see a perforamnce increase then? David -----Original Message----- From: Firstworks/4access [mailto:dav...@fi...] Sent: 16 November 2005 17:10 To: sql...@li... Subject: Re: [Sqlrelay-discussion] DBI Performance If I'm not mistaken, the MySQL DBI driver is written in C, while the SQL Relay DBI driver is written in perl. It's possible that could account for the difference. The DBI driver should use the socket parameter. What connect string are you using? Also, is SQL Relay running on the same machine as the database? If so, are you sure it's configured to use the unix socket? Dave dav...@fi... On Wed, 2005-11-09 at 10:07 +0000, David Edwards wrote: > Thanks, David. Looking forward to 0.37! > > On a slightly different topic, I have briefly tried benchmarking the SQL > Relay DBI driver against the standard MySQL DBI driver. Obviously there are > a huge number of variables involved - I am running SQL Relay locally on our > web server connecting to a DB on a different machine, for example - but I > was surprised to find SQL Relay marginally slower. On average, transactions > via SQL relay took 0.16 secs vs 0.13 secs direct. I was hoping for a slight > improvement through connection pooling. Are there any tweaks I could try not > listed on your performance tuning page? Does the socket parameter get used > by the DBI driver? Or would I be best off rewriting my DB wrapper to use the > SQL Relay API directly rather than via DBI? > > David > > -----Original Message----- > From: David Muse [mailto:dav...@fi...] > Sent: 08 November 2005 04:04 > To: sql...@li... > Subject: RE: [Sqlrelay-discussion] Perl compilation error with 0.36.4 > > > Hmmm, I'll have to look into that a bit deeper. Adding a $ in front > will have the effect of requiring the 3rd argument to be the string > "SQLRelay::SQL_CLOB" to bind a clob. I'm not sure that's right, but if > you don't use clob's then go with it :) > > I'll figure out what's what though and fix it in the 0.37 release. > > Dave > dav...@fi... > > On Fri, 2005-11-04 at 15:03 +0000, David Edwards wrote: > > Hi David, > > > > Thanks for replying. I've tried the replacement file, but still got the > same > > compilation error. I did try inserting a $ in front of > > DBD::SQLRelay::SQL_CLOB and DBD::SQLRelay::SQL_BLOB on lines 282 and 294, > > and this did get rid of the compilation error. However, I don't know > whether > > the resulting code does what it's supposed to do, because I'm not using > > CLOBs or BLOBs. > > > > Regards, > > > > David > > > > -----Original Message----- > > From: Firstworks/4access [mailto:dav...@fi...] > > Sent: 04 November 2005 14:48 > > To: sql...@li... > > Subject: Re: [Sqlrelay-discussion] Perl compilation error with 0.36.4 > > > > > > Hmm, looks like DBD::SQLReay::SQL_CLOB and SQL_BLOB aren't defined. Try > > replacing /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm with the > > attached file and see if it works. > > > > David Muse > > dav...@fi... > > > > On Thu, 2005-11-03 at 10:56 +0000, David Edwards wrote: > > > I am trying to use SQL Relay via the DBI driver from a simple Perl > script, > > > but have run into a problem. On our development environment - using SQL > > > Relay 0.33.1 - we have no problems. However, using SQL Relay 0.36.4 on > our > > > production environment, trying to run the same script results in the > > > following Perl error: > > > > > > install_driver(SQLRelay) failed: Bareword "DBD::SQLRelay::SQL_CLOB" not > > > allowed while "strict subs" in use at > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 282. > > > Bareword "DBD::SQLRelay::SQL_BLOB" not allowed while "strict subs" in > use > > at > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 282. > > > Bareword "DBD::SQLRelay::SQL_CLOB" not allowed while "strict subs" in > use > > at > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 294. > > > Bareword "DBD::SQLRelay::SQL_BLOB" not allowed while "strict subs" in > use > > at > > > /usr/lib/perl5/site_perl/5.6.1/DBD/SQLRelay.pm line 294. > > > Compilation failed in require at (eval 4) line 3. > > > > > > Is this an issue with our Perl, or a problem with the SQL Relay code? If > > the > > > former, does anyone have any suggestions as to how to solve the problem? > > > > > > Thanks, > > > > > > David > > > > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by: > > > Tame your development challenges with Apache's Geronimo App Server. > > Download > > > it for free - -and be entered to win a 42" plasma tv or your very own > > > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > > > _______________________________________________ > > > Sqlrelay-discussion mailing list > > > Sql...@li... > > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: > > Tame your development challenges with Apache's Geronimo App Server. > Download > > it for free - -and be entered to win a 42" plasma tv or your very own > > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion This e-mail is only intended for the person(s) to whom it is addressed and may contain confidential information. LB Icon does not accept responsibility for any loss or damage caused by this email or any attachments. Unless clearly stated to the contrary, any opinions or comments are personal to the writer and are not made on behalf of LB Icon. If you have received this e-mail in error, please notify us immediately at in...@lb... and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. Thank you for your co-operation. LB Icon is the business name of Aspect Internet Holdings Limited, Aspect Technologies Limited, LB Icon Limited, Object 1 Limited and Escador Limited. |
|
From: Maciej W. <mac...@co...> - 2005-11-23 08:05:14
|
Hi!
I have a simple web service written in java, that gets data from
database using SQLRelay. The problem is with ping command.
This is part of my code:
import com.firstworks.sqlrelay.SQLRConnection;
import com.firstworks.sqlrelay.SQLRCursor;
if (conn.ping()){
...do something...
}
The database I'm connecting to is backuped every night and swithed down
for a while and possibly this causes problem. Every morning I'm receiving
'false' from ping() command, but... when I'm trying to send query even
when ping
returns 'false' it executes correctly... I did something like this:
if (conn.ping()){
...do something...
}
else{
SQLRCursor cur=new SQLRCursor(conn);
cur.getNullsAsNulls();
String query = "SELECT * from table";
cur.sendQuery(query);
System.out.println("ping false. rowCount:"+cur.rowCount());
}
and rowCount() returns 1 for my select, so... connection works!
Strangely after doing this query and starting my program again ping
returns 'true'... till next morning.
I think it's possibly a bug with ping() in java code...?
--
Maciej Wisniowski
|
|
From: Guo, J. <Jin...@pa...> - 2005-11-22 11:20:04
|
Dave, I setup SQLRelay with 20 connections, everything is fine. But when I = tried to start 30 connections, most of the connections failed. Here is = log of one of the connection process. .... 11/16/2005 20:35:48 EST connection [19181] : database is available 11/16/2005 20:35:48 EST connection [19181] : initializing session... 11/16/2005 20:35:48 EST connection [19181] : done initializing = session... 11/16/2005 20:35:48 EST connection [19181] : announcing availability... 11/16/2005 20:35:48 EST connection [19181] : registering for handoff... 11/16/2005 20:35:48 EST connection [19181] : handoffsockname: = /opt/sybase/fir stworks/var/sqlrelay/tmp/sockets/parsons-handoff 11/16/2005 20:35:48 EST connection [19181] : trying... 11/16/2005 20:35:48 EST connection [19181] : done registering for = handoff 11/16/2005 20:35:48 EST connection [19181] : acquiring announce mutex Then, the process hang there forever. |
|
From: Gene T. <gen...@es...> - 2005-11-21 01:52:53
|
I'm having problems building sqlrelay on SunOS 5.10, I'm planning on
using Python and Orcale on SunOS 5.10.
1) If one wants to use the 32 bit Oracle 9i libraries the configure
script needs to be changed:
sed -e 's!ORACLE_HOME/lib!ORACLE_HOME/lib32!g' <configure
>configure.fixed
2) The rudiments library ha some peculiar undefeind references:
[//gthomas@allan1-mmx30build~/my-dev/sqlrelay-0.36.4]
> gmake
gmake -C src all
gmake[1]: Entering directory
`/home/users/gthomas/my-dev/sqlrelay-0.36.4/src'
gmake -C util all
gmake[2]: Entering directory
`/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory
`/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util'
gmake -C listener all
gmake[2]: Entering directory
`/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/listener'
/bin/sh ../../libtool --mode=link g++ -o sqlr-listener sqlrlistener.lo
main.lo -L../../src/util -lsqlrutil -L/usr/local/firstworks/lib
-lrudiments -lsocket -lpthread -L/usr/sfw/lib -lssl -L/usr/sfw/lib
-lcrypto -lrt -lrt -lrt -ldl
g++ -o .libs/sqlr-listener .libs/sqlrlistener.o .libs/main.o
-L/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util
/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/util/.libs/libsqlrutil.so
-L/usr/local/firstworks/lib -L/usr/sfw/lib
/usr/local/firstworks/lib/librudiments.so -lsocket -lpthread -lssl
-lcrypto -lrt -ldl -Wl,--rpath -Wl,/usr/local/firstworks/lib
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`dlclose@SISCD_2.3'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`write@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`dlsym@SISCD_2.3'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`dlopen@SISCD_2.3'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`open@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`tcdrain@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`waitpid@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`sigprocmask@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`fcntl@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`select@SUNW_1.2'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`setitimer@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`close@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`dlerror@SISCD_2.3'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`sigsuspend@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`read@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`msync@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`fork@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`fsync@SUNW_0.9'
/usr/local/firstworks/lib/librudiments.so: undefined reference to
`sigaction@SUNW_0.9'
collect2: ld returned 1 exit status
gmake[2]: *** [sqlr-listener] Error 1
gmake[2]: Leaving directory
`/home/users/gthomas/my-dev/sqlrelay-0.36.4/src/listener'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/users/gthomas/my-dev/sqlrelay-0.36.4/src'
gmake: *** [all] Error 2
yet
[//gthomas@allan1-mmx30build~/my-dev/sqlrelay-0.36.4]
> nm /usr/local/firstworks/lib/librudiments.so | grep dlclose
U dlclose
indicates nothing unusual.
Has anyone had any problems like this?
Thanks,
Gene Thomas.
|
|
From: Firstworks/4access <dav...@fi...> - 2005-11-18 19:41:37
|
Christian, SQL Relay has a feature called suspended sessions where you can run a query, suspend the session, pass a session id to the next page (or store it somewhere) and then the next page can pick up the same session and do more queries. It's usually used by people who want a transaction to span multiple pages. Ie. one insert is done on each page, and on the last page, you can commit or rollback the inserts. In theory, you could prepare and execute the query on one page, suspend the session, pass the session id around and on each page, resume the session and re-execute the query. I've never tried that exactly, but I'm pretty sure it would work. You would have to make sure the query does get executed though on the first page, as the SQL Relay client doesn't send seperate prepare and execute commands to the server, just single "prepare-and-execute" or "re-execute" commands. As for 10 million transactions per day, thats about 115 per second. I've gotten several reports of people doing "thousands of queries per second" with SQL Relay, but that was against Oracle and who knows what kind of hardware. David Muse dav...@fi... On Thu, 2005-11-17 at 10:12 -0600, Cristian Prieto wrote: > Hi, first at all I'm a new user of SQLRelay and I have a few questions: > > 1. Does SQLRelay keeps alive a PostgreSQL session? I say this cuz I have a > very intensive web database application. I always use and do the same query > in the database (just a call to a stored procedure as "select * from > mysp()") This sp is written in plpgsql, and each time I have to execute it > eats a lot of cpu. (mainly cuz I have to "recompile" the plpgsql, prepare > the queries and so on). The first time I run it takes around 114ms, but the > next time it would take just 15ms. I asked to the postgresql team and so on > and I get the same answer, in a web application the performance could be so > poor cuz there is no way to keep the same session alive for each web > "consumer" process. I guess is so stupid, because I'm doing the same query > everytime. > 2. I've been using pgpool, and it doesn't help too much for me, certainly it > keeps a set of connection alive, but it doesn't share the same > session/connection between web consumers, so I just minimize the connection > time, not the compile/prepare time of the plpgsql stored procedures. > 3. I need to have 10M connections per day, is this possible with sqlrelay? > Somebody has achieved similar performance? > > Thanks a lot for your answers, Thanks again. > > Cristian Prieto > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |