Re: ESQL connection check
Posted in 1997
Hi, What I've done in the past is rerun the connection command periodically. I'm assuming your process is in some sort of loop so you could reconnect periodically or when you get a certain category of sql errors. -Bill } } Hello, } } Does anybody know of an efficient way to check the health of a } connection? The code I've inherited makes a connection at startup, then } uses that connection the whole time it is up (almost 24 hours each day). } This is fine most of the time - it reduces the overhead of making a } connection for every db transaction, but when the engine is taken down, } we run into problems. I'm handling SIGPIPE, but that only comes into } play when box itself is rebooted. } } There is a periodic health check that does an sqldone(), but that does } not tell us that the connection is bad. Is there a simple way to test } the connection, other than writing a small query? We're using 7.12.UC1 } Pyramid Nile 150 SMP_DC-OS rel d87, about to upgrade to some flavor of } 7.23 on HPUX, so if there's an improvement in that release I can wait } for it. } } Oh, the engine is coming down in a PANIC. I found the reason for that, } (someone was yanking my shared memory & semaphore) and it's being fixed, } but I still want to handle this type of situation in the future. } } Thanks, } } Teresa } -- Bill Ennis Voice: 312-474-7516 SSA Fax: 312-474-7460 500 W. Madison email: ennis@ssax.com ennis@accesschicago.net