[Sqlrelay-discussion] Blocking call when DB is offline
Brought to you by:
mused
From: Z S. <sha...@ho...> - 2012-05-10 10:29:55
|
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 |