Re: [Sqlrelay-discussion] Blocking call when DB is offline
Brought to you by:
mused
From: David M. <dav...@fi...> - 2012-05-11 18:31:03
|
Hi Shan, There is one option that might help... On the client side there is a sqlrcon_setTimeout(sec,usec) function that allows you to set the number of seconds and microseconds that the client will wait while connecting. If the connection doesn't succeed within that amount of time, then it will fall through. You could try that, but I'm not sure that it will help in this case. It looks like something is causing the second query to wait for an available database connection, and it gets stuck waiting forever. Could you post your sqlrelay.conf file? I'll do some tests and let you know what I find. Dave dav...@fi... On 05/10/2012 06:29 AM, Z Shan wrote: > Hi, > My application needs to talk with Oracle DB. To improve performance, I > use SQLRelay as intermediate layer. > > Recently, I have met with following problem : > > 1 Both SQLRelay and Oracle DB are started > 2 Send query from my App (use 'sqlrcur_sendQuery') => OK > 3 Shutdown Oracle DB > 4 Send query again from my App, the call on "sqlrcur_sendQuery" is > blocked (no return). > 5 Turn on Oracle DB again > 6 The old call to sqlrcur_sendQuery is returned. Further queries can > all be processed. > > I activated log flag of SqlRelay (SQLRDEBUG=ON), and see following output: > > " > Connecting to listener... > Inet socket: 10.10.10.120:9000 > Authenticating with listener : bto_spp:bto_spp > Waiting for auth success/failure... > No authentication error. > Must Reconnect. > Reconnecting to > server: 10.10.10.120 > inet port: 33681 > Connected. > Authenticating with connection : bto_spp:bto_spp > Waiting for auth success/failure... > No authentication error. > Sending Query: > SELECT * FROM HSPGW_CONFIG_VIEW WHERE ZONE_ID = 1682 AND IS_ENABLED = > 1 AND TARIFF_ID = 16 > Length: 90 > Requesting a new cursor. > Sending 0 Input Bind Variables: > Sending Output Bind Variables: > Send Column Info: yes > Skipping and Fetching > Skipping 0 rows > Fetching 0 rows > " > > Is there any way to let 'sqlrcur_sendQuery' return after certain time > when the connection to DB is failed (like setting a timeout)? > Otherwise the whole APP will hang as far as the DB is offline. > > Any help will be appreciated. > > Shan > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________________ > 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 |