Re: ESQL connection check
Posted in 1997
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Bill Ennis wrote: > > 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 > I considered redoing the connection at first, but with well over 10,000 users submitting transactions, it would be difficult to find a window to do a reconnect. Since I don't have all the connection information when I get the errors, what I decided to do is to do a get diagnostics during the periodic health check. If I got a class 08 error on the last query that was run, I redo the connection. Not very elegant, but it should do the job. Thanks for the input. If you see any problems with this approach, please let me know. I'm still trying to transition my brain from Sybase to Informix, so I don't know all the little tricks/quirkss in Informix yet... Teresa > } > } 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. > }