Pro*C CONNECT or RELEASE taking 20+ seconds

The basic problems are
<li> the EXEC SQL ROLLBACK WORK RELEASE; statement takes a long time (I've seen 25 seconds)
<li> the EXEC SQL CONNECT :usrname; statement also takes a long time (I've seen 8 seconds)
What are the things I should check?
h1.
Details:
The database server is on Linux (Red Hat Enterprise Linux ES release 3 (Taroon Update 7)), while the run-time environment, Pro*C++ precompiler, C++ compiler, and client libraries are on Alpha (Tru64 v 5.1B-4).
On the Alpha, the Oracle version is 9.2.0.8.0 (both SQL*Plus and 'proc'), and the C++ compiler is Compaq C++ V6.5-042 for HP Tru64 UNIX V5.1B (Rev. 2650). On the Linux, the database server version is 9.2.0.4.0
There is very little activity on this database, or on the server (about 1% processor load). For the most recent problem with long disconnect times, the only other known activity is another Pro*C process waiting on a DBMS_LOCK (user lock) being held by this one. But because this one is taking so long to exit, the other Pro*C process times out failing to get the lock (after which it does an EXEC SQL ROLLBACK RELEASE). There are three other Pro*C processes, but they have exited prior to t=13 (see below).
One observation is that when the second process times out and does the EXEC SQL ROLLBACK RELEASE; both processes then return from that statement, after which they exit.
My environment variables, in the client environment, are
NLS_LANG=american_america.US7ASCII
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=LINUX
DBA=/u01/app/oracle/admin
TNS_ADMIN=/u01/app/oracle/product/9.2.0/db/network/admin
ORACLE_HOME=/u01/app/oracle/product/9.2.0/db
TWO_TASK=LINUXThe code fragments involved are
const time_t startTime = time(0);   // seconds since epoch - executed at file scope
                       // when both processes begin.
#define COUTVAR(x)       if (DEBUGGING_STATUS) cout << x << ", t=" << (time(0) - m_startTime) << ": "
#define CERRVAR(x)                             cerr << x << ", t=" << (time(0) - m_startTime) << ": "
#define SQLINFOHERE     /* code to stash __FILE__ and __LINE__ into global vars, used if an error occurs */
OracleConnection::OracleConnection(const char *processTag, time_t startTime, const Autotester &)
  : m_processTag(processTag), m_startTime(startTime)
    EXEC SQL BEGIN DECLARE SECTION;
      char myUsername[] = "AUTOTESTER/xxxx";
    EXEC SQL END DECLARE SECTION;
    COUTVAR(m_processTag) << "About to EXEC SQL CONNECT" << endl;
    SQLINFOHERE;
    EXEC SQL CONNECT :myUsername;
    COUTVAR(m_processTag) << "EXEC SQL CONNECT successful" << endl;
OracleConnection::~OracleConnection()
  // Function Try Blocks do not work in the HP compiler (at runtime, get this message:
  // Internal error: could not find live exception.)
  // Therefore nest normal try blocks.
  try
    try
      COUTVAR(m_processTag) << "About to EXEC SQL ROLLBACK RELEASE" << endl;    // Output t=13
      SQLINFOHERE;
      EXEC SQL ROLLBACK WORK RELEASE;
      COUTVAR(m_processTag) << "EXEC SQL ROLLBACK RELEASE successful" << endl;  // Output t=38 (25s later)
    catch(...)
      CERRVAR(m_processTag) << "Error in EXEC SQL ROLLBACK RELEASE" << endl;
  catch(...)
    // Here we don't do ANYTHING, because we don't want to throw (another) exception
    // if it happens to be processing another exception.
}h2.
Other things tried
When I do this
$ sqlplus autotester/xxxx < /dev/null
it never takes more than 0.3 seconds to connect and disconnect. The environment variables are the same.
The sqlnet.ora file has no mention of SQLNET.AUTHENTICATION_SERVICES, I have heard that setting it to (NTS) can slow things down, and someone else notes that you can generally comment it out. But we've never had it in our sqlnet.ora file.
Using tnsping gives this:
$ tnsping LINUX
TNS Ping Utility for Compaq Tru64 UNIX: Version 9.2.0.8.0 - Production on 28-JUN-2012 12:02:16
Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.
Used parameter files:
/u01/app/oracle/product/9.2.0/db/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host = mylinuxhost.FICTIONAL.com)
  (Port = 1521)) (CONNECT_DATA = (SERVICE_NAME = unix.world)))
OK (30 msec)What are the things I should check?
Edited by: Logical_Star on 27-Jun-2012 20:36, to make code output narrower

OK, I have converted the program to OCI (I had to convert the whole program, because Pro*C and OCI cannot be mixed) and found similar behaviour.
The OCI version of the program is (sometimes) taking 28 seconds to disconnect, whereas the Pro*C version is now taking 40 seconds to disconnect. I note that the frequency is much higher in the Pro*C program.
The OCI version has this code
#define LEN_SQLGLM_MSG      512   /* Oracle manual: can be max of 512 chars */
const time_t startTime = time(0);   // seconds since epoch - executed at file scope
                                  // when both processes begin.
#define COUTVAR(x)       if (DEBUGGING_STATUS) cout << x << ", t=" << (time(0) - m_startTime) << ": "
#define CERRVAR(x)                             cerr << x << ", t=" << (time(0) - m_startTime) << ": "
#define CHECK_AND_THROW(r,m)   do {                                                    \
                     if(r) { OraText errbuf[100] = "Failed to get error"; int errcode; \
OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR); \
string errMsg(m); errMsg += " ... "; errMsg += reinterpret_cast<const char*>(errbuf); \
if (errMsg.size() > LEN_SQLGLM_MSG) errMsg.erase(LEN_SQLGLM_MSG);                     \
throw ExDb(r, errMsg.c_str(), __LINE__, __FILE__);} } while(0)
OracleConnection::OracleConnection(const char *processTag, time_t startTime, const Autotester &)
  : m_processTag(processTag), m_startTime(startTime), p_env(0), p_err(0), p_svc(0),
    p_sql(0), p_dfn(0), p_bnd(0)
  COUTVAR(m_processTag) << "About to connect" << endl;
  int rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0,  /* Initialize OCI */
          (dvoid * (*)(dvoid *, size_t)) 0,
          (dvoid * (*)(dvoid *, dvoid *, size_t))0,
          (void (*)(dvoid *, dvoid *)) 0 );
  CHECK_AND_THROW(rc, "OCIInitialize error");
  /* Initialize evironment */
  rc = OCIEnvInit( (OCIEnv **) &p_env, OCI_DEFAULT, (size_t) 0, (dvoid **) 0 );
  CHECK_AND_THROW(rc, "OCIEnvInit error");
  /* Initialize handles */
  rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
          (size_t) 0, (dvoid **) 0);
  CHECK_AND_THROW(rc, "OCIHandleAlloc error 1");
  rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
          (size_t) 0, (dvoid **) 0);
  CHECK_AND_THROW(rc, "OCIHandleAlloc error 2");
  /* Connect to database server */
  rc = OCILogon(p_env, p_err, &p_svc, "AUTOTESTER", 10, "xxxxx", 10, "LINUX", 5);
  CHECK_AND_THROW(rc, "OCILogon error");
  COUTVAR(m_processTag) << "Connect successful" << endl;
OracleConnection::~OracleConnection()
  // Function Try Blocks do not work in the HP compiler (at runtime, get this message:
  // Internal error: could not find live exception.)
  // Therefore nest normal try blocks.
  try
    try
      COUTVAR(m_processTag) << "About to disconnect" << endl;     // Output t=13
      int rc = OCILogoff(p_svc, p_err);
      CHECK_AND_THROW(rc, "OCILogoff error");
      rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT);
      CHECK_AND_THROW(rc, "OCIHandleFree error 1");
      //NOTE: This OCIHandleFree call should be done, in theory, but it was giving
      //      an unknown error for which OCIErrorGet was not retrieving the error.
      //NOTE rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
      //NOTE CHECK_AND_THROW(rc, "OCIHandleFree error 2");
      rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
      CHECK_AND_THROW(rc, "OCIHandleFree error 3");
      COUTVAR(m_processTag) << "Disconnect successful" << endl;   // output t=41 (28s later)
    catch(ExDb &ex)
      CERRVAR(m_processTag) << "SQL Error while disconnecting" << endl;
      ex.print_error();
    catch(...)
      CERRVAR(m_processTag) << "Strange Error while disconnecting" << endl;
  catch(...)
    // Here we don't do ANYTHING, because we don't want to throw (another) exception
    // if it happens to be processing another exception.
}Edited by: Logical_Star on 02-Jul-2012 00:53 (wrong TNSNAME)

Similar Messages

  • Macbook Pro WIFI connection slow and intermittent

    I recently moved to a new apartment and had Time Warner install our internet/Wifi. My Macbook Pro will connect to the Wifi and work fine for about 30-60 seconds and then become extremely slow, even to the point of no connection most times. I have tried using both the new router and the old router that worked just fine at our old apartment but both behave the same way. I have reset the routers multiple times but that does not fix the situation and I do not believe the router is the problem since my two roommates (one of which uses a Macbook Pro) have no connection problem. My iPhone connects perfectly fine as well. When I am on other Wifi addresses, my Macbook works just fine. Also, my Macbook is only one month old. I called Apple to try and solve the problem and they believe it is an interference problem however the connection remains the same no matter how close or far from the router I am and all other devices don't seem to have interference problems. Any help is very much appreciated!
    Eric

    Might be corrupted network preferences ..
    Type or copy paste the following:
    /Library/Preferences/SystemConfiguration
    Click Go then move all the files in the SystemConfiguration folder to the Trash.
    See if that makes a difference.
    Your Mac will generate a new SystemConfiguration folder for you.
    If that doesn't help, try Wi-Fi diagnostics here >  Wi-Fi: How to troubleshoot Wi-Fi connectivity

  • Firefox taking 30 seconds to start

    Firefox is now taking 30 seconds or more to start on 1 of my machines. I have tried everything including complete removal and reinstallation to no avail. On a slower machine it still starts in under 1 second. Antivirus us the same on both machines. All plugins are currently disabled yet the problem still persists. All was fine until recent update.

    It is possible that your security software (firewall, anti-virus) blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full, unrestricted, access to install for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    *https://support.mozilla.org/kb/fix-problems-connecting-websites-after-updating

  • My wifi-connection stops by taking some distance from my router, let's say 4 meters (12feet) reseting network setting etc, doesn't help

    my wifi-connection stops by taking some distance from my router, let's say 4 meters (12feet) reseting network setting, etc, doesn't help!
    any suggestions?
    jonathan

    neuwerld wrote:
    Ohh thanks guys!
    It worked as a charm, and thanks Brisbin33 for the autostart.sh tip.
    So the thing that caused my whole system not to work as it should was that I forgot to put a "&" after conky?
    haha that´s kinda anoying I have been sitting and looking through like a milllion files looking for the answer
    But again, really thanks!
    /Neuwerld
    that little "&" sends the conky process to the background freeing up the current process (your autostart.sh script) to finish doing what it's doing so you can move on to running openbox itself.  with this in mind, it should be obvious why keeping conky in the foreground would cause problems.
    also, replacing it with (sleep 1 && conky) & means... wait a second, when that's done successfully (&&) run conky, and put all of that () to the background.  that way openbox comes up immediatly and only a second later you've got your panel and monitor.
    all this after .xinitrc and before openbox

  • Win 7 Pro not connecting to remote Win 7 pro via port 3389

    I have a new Dell XPS 8700 Win Pro 64 bit that will not connect to work machine of same specs, i.e, XPS 8700 Win 7 Pro. Ironically an old lap top running XP Pro
    will connect to work computer. I have a new Dell laptop with Win 8.1 pro that will not connect either.  I tried everything, uninstalled Symantec End point, shut off the Windows Firewall, did a complete
    hardware check via Dell Diagnostics, made sure network discovery was on as well as all remote services, turned on RD, changed every setting on the  RD dialog box, pinged the external IP and it timed out. None of the forums seem to have an answer and I
    am at wits end. I set up 15 machines at work under Win 7 for RD and all are working with Win 7 Pro.

    Hello Al Wayne,
    What is your current situation?
    Please share us more information for better analyzation as Frederik Long mentioned.
    Do you mean that the Dell XPS 8700 and laptop can’t RDP to work Windows 7 machines, but the Windows XP laptop can RDP to?
    Please take the following steps for troubleshooting:
    1. Share us the result of command ipconfig /all in the source and destination computers
    2. Check if we can ping the Windows 7 machines from the Dell XPS 8700 and laptop
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Macbook pro wont connect to internet using cable, but connects using wifi fine

    My macbook pro wont connect to the internet using a cable, but connects using wifi fine.  I use wifi at home but sometimes need to use my laptop at work and connect using a cable but it says i'm not connected to the internet?

    Can you open a terminal and invoke the following commands:
    ping -c 10 localhost
    and
    ping -c 10 google.com
    You should normally get something like:
    PING google.com (74.125.224.103): 56 data bytes
    64 bytes from 74.125.224.103: icmp_seq=0 ttl=55 time=19.053 ms
    64 bytes from 74.125.224.103: icmp_seq=1 ttl=55 time=37.692 ms
    64 bytes from 74.125.224.103: icmp_seq=2 ttl=55 time=46.988 ms
    64 bytes from 74.125.224.103: icmp_seq=3 ttl=55 time=33.466 ms
    64 bytes from 74.125.224.103: icmp_seq=4 ttl=55 time=28.940 ms
    64 bytes from 74.125.224.103: icmp_seq=5 ttl=55 time=58.070 ms
    64 bytes from 74.125.224.103: icmp_seq=6 ttl=55 time=33.335 ms
    64 bytes from 74.125.224.103: icmp_seq=7 ttl=55 time=33.361 ms
    64 bytes from 74.125.224.103: icmp_seq=8 ttl=55 time=36.099 ms
    64 bytes from 74.125.224.103: icmp_seq=9 ttl=55 time=41.111 ms
    --- google.com ping statistics ---
    10 packets transmitted, 10 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 19.053/36.811/58.070/9.939 ms

  • Hello, my sister her macbook pro cannot connect to our wireless internet. My imac however can, so the problem has to do with her laptop. We were wondering how we could solve this problem? Thank you very much in advance!

    Hello, my sister her macbook pro cannot connect to our wireless internet. My imac however can, so the problem has to do with her laptop. We were wondering how we could solve this problem? Thank you very much in advance!

    We did that, but it just doesn't seem to be able to connect. So basically we tried to connect to our network and insert the password, but afterwards it does nothing. Weird thing is also that the network symbol (top right of the screen) says that it has been connected, but when I go look at the system preferences --> network, it states that it has not been connected

  • Just bought MacBook Pro, cannot connect to the Internet at home. I have wifi at home and my iPad and cell phone can connect to the wifi

    Just bought MacBook Pro, cannot connect to the Internet at home. I have wifi at home and my iPad and cell phone can connect to the wifi

    ***   When you post for help, please state which OS X is installed.
    If you aren't sure, click About this Mac from your Apple menu 
    Troubleshooting advice can depend on that information.

  • My Macbook Pro cannot connect to the internet using an ethernet cord.

    My Macbook Pro cannot connect to the internet using an ethernet cord. It was working fine for weeks, then all of a sudden just stopped. What could the problem be?

    Hi bean07670,
    If you are having an issue with the Ethernet connection on your MacBook Pro, you may find the following article helpful:
    Mac OS X: Troubleshooting a cable modem, DSL, or LAN Internet connection
    http://support.apple.com/kb/TS1317
    Regards,
    - Brenden

  • My macbook pro cannot connect to the app store is there anyway of fixing this?

    my macbook pro cannot connect to the app store does anyone know how to fix this?

    Read threads listed on right under heading More Like This
    Allan

  • Macbook Pro cannot connect to the internet even when others can

    Hi! Please help me. We have an internet WIFI connection in our office but only my MacBook Pro cannot connect even when I entered the correct password. My Iphone and Ipad work just fine. It says "connection timeout" but all other laptops can connect. I tried network diagnostics already and it always say "connection timeout". I dont know what to do anymore.

    Yes, and when I open the Network Utility it shows a working IP address, and a 54Mb/s speed from the wireless router. It even shows the shared computers from my roomates. But when I try to access the internet it does not load anything on Safari or Firefox ( or any other internet application for that matter). It is completely unconnected. YET, As soon as I activate the AirPort card on the top right where I have my signal strength, it shows on the Network Utility information that there are 'packages' being sent and received, and I have NO programs open what so ever, I have closed everything except finder and network utility... Does this mean I am being hacked, or have some sort of Trojan or something in my computer? I ran an antivirus that my school provided, called Virex by McAfee, it came out clean except it says it cannot read one file.
    I tried repairing my disk, and that did not work either. I did the Ram reset like you suggested, but that also did not work. I doubt it being a hardware error. I am going to try to connect it to an ethernet cable to see if that will work. Then I will let you know what happens with that, but that would still not be a solution since I need it wireless, cause the router is in another part of the house.
    Thank you for your help, and I hope we can get this sorted out.

  • My MacBook Pro spits out a CD within 30 seconds.  It doesn't show up anywhere.  Help please.

    My MacBook Pro spits out a CD within 30 seconds.  It doesn't show up anywhere.  Help please.

    You can try a commercial lens cleaner.  They are sold everywhere for little expense.
    http://www.walmart.com/ip/Memorex-32020022912/15120287

  • Connection to iTunes fails with second user account

    Hi there!
    For some weeks now I am experiencing Problems connecting the iTunes of a Second User to Apple TV. I keep getting the error message that the connection failed and I should check if the iTunes is in the same network. Dumb message since one second before I selected the iTunes library of the second user in the list on Apple TV and before that I watched content from the iTunes library of the first user without any problems. So it is not the network connection.
    This error can be easily reproduced:
    Set up multiple user accounts on Mac
    Set up home sharing on Apple Tv and all iTunes of them user accounts
    Restart all to beginn test
    Open iTunes of any user
    Access content on Apple TV without problems
    Keep first user logged in and iTunes running while switching to second user on Mac
    Open iTunes of second user
    Second library will show up on Apple Tv
    Try access second users library - error message will be shown
    First iTunes library still works fine
    Close first users iTunes and error will stay
    Close all iTunes and restart Apple Tv
    First iTunes open will work - any second will not
    System:
    MacOS 10.7.5, iTunes 10.7 (21), Apple Tv 2 with OS 5.1 (5201), network via Ethernet cable to Time Capsule router
    Thanks for any tips to get rid of this error!
    Cheers!
    Gerd

    Hi all!
    Still the same, very reproduceable problem? No solution anyone?
    Upgraded to latest OS on ATV2 (5.2.1) and iMac and iTunes (11.0.2). No result. Obviously this issue is being ignored by apple techs or it is really just me having this problem.
    Thanks for any help!
    Gerd

  • My MacBook Pro (purchased in 2011) is taking 10 minutes to boot-up.  It's also taking much longer to open files.  I have 650 GB out of 700 GB left on my machine so it's not that I've overloaded the memory.  Is anyone else having this problem?

    My MacBook Pro (purchased in 2011) is taking 10 minutes to boot-up.  It's also taking much longer to open files.  I have 650 GB out of 700 GB left on my machine so it's not that I've overloaded the memory.  Is anyone else having this problem?

    Look at this comprehensive trouble shooting document;
    https://discussions.apple.com/docs/DOC-3353
    I suggest that you start with SMC and PRAM resets.
    Then  a Safe Boot.
    Ciao.

  • My macbook pro is connected to wifi but it will not connect to the internet.

    My macbook pro is connected to wifi but it will not connect to the internet. When I go on safari, it says that "Safari can't verify the identity of the website". Then I tried to update flashplayer but you need the internet to update it. All this only started happening after that Moutain Lion software was downloaded onto the laptop. Please help, I have been internet-less for a couple months now.

    Hi rynhelp,
    If you are not able to connect to the internet after installing Mountain Lion, see this article for information on how to start troubleshooting:
    OS X Mountain Lion: Use Network Diagnostics
    http://support.apple.com/kb/PH10984
    You may find additional troubleshooting information in this article useful:
    Troubleshooting Wi-Fi issues in OS X Lion and Mac OS X v10.6
    http://support.apple.com/kb/HT4628
    It is written for Lion but works for Mountain Lion as well.
    Cheers,
    - Ari

Maybe you are looking for

  • Remote System Explorer on a Wireless LAN

    On a wireless LAN when I use Remote System Explorer, it knocks our Fieldpoint network modules off-line. We are unable to ping them. Once we restart the units, they work fine until someone uses the Remote System Explorer again. Any ideas?

  • Supported Tools version when upgrading from PeopleSoft HCM 9.1 to 9.2

    Hello, Our customer is on HCM 9.1 FP2 with 8.52.03 tools. Now, they would like to upgrade to HCM 9.2 and PeopleTools 8.53 I have found the following upgrade path on Oracle Support. PeopleSoft Human Capital Management 9.1 to 9.2 Upgrade Home Page (Doc

  • Workflow 2013 error

    Hi everybody! I have a sharepoint 2013 farm with 4 servers. I install and configure workflow manager 1.0 successfully. when I create a workflow of template workflow 2010 on my list it create and run properly. First time I create a workflow of templat

  • CRM 2007 Pricing based on settlement period of billing plan

    Hi, I need the ability to have disocunts on a service contract based on the settlement period of the billing plan. A contract list price is 12 GBP per month. If the customer want to bill monthly no doscount will be applied. If the customer wants to b

  • Selective Deletion on Inventory Cube 0IC_C03 via Calendar Day

    Hello Group I am trying to do a selective delete to our inventory cube 0IC_C03 and found there is not an option to select day. Does anyone have any thoughts on how do delete using day? Please note that my cube has been compressed and I do not have a