How can i connect to database(informix) at second time?
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I am programming with ESQL-C recently.When i test my program,i find it halt itself,and i kill it(i think the connection to database was without normal close).I test it again(just run it again),it failed to connect to database,the message is "IX000:Network driver cannot open the network device".I don't know why. The only way to conenct the database is reboot the Unix,or run my program on another PC,but can only connect successfully once. How can i deal with it? ------thanks.
>Subject: How can i connect to database(informix) at second time? >From: "Lyo" lyo@soim.net >Date: 21.04.00 14:32 W. Europe Daylight Time >Message-id: <8dphkm$1vcg$1@news.cz.js.cn> > >I am programming with ESQL-C recently.When i test my program,i find it halt >itself,and i kill it(i think the connection to database was without normal >close).I test it again(just run it again),it failed to connect to >database,the message is "IX000:Network driver cannot open the network >device".I don't know why. >The only way to conenct the database is reboot the Unix,or run my program on >another PC,but can only connect successfully once. >How can i deal with it? >------thanks. > > might just be a process problem like 'ulimit'. Just logout and log back in with a fresh process. Nona
Lyo wrote: > I am programming with ESQL-C recently.When i test my program,i find it halt > itself,and i kill it(i think the connection to database was without normal > close).I test it again(just run it again),it failed to connect to > database,the message is "IX000:Network driver cannot open the network > device".I don't know why. > The only way to conenct the database is reboot the Unix,or run my program on > another PC,but can only connect successfully once. > How can i deal with it? > Some UNIXes have trouble releasing the network port if a connection is not closed properly. You need to adjust the keepalive parameter in the sqlhosts file (and doing so to the network drivers also in the kernel will help). Usually the open connection will be closed by the network drivers after a period that varies from 15 minutes to an hour automatically so if waiting, as well as rebooting, finally clears the problem then you can be sure that the keepalive is it. Keepalive is maintained by the "k=" sqlhosts line option, I do not remember the kernel parameter. Art S. Kagel
I tried to set the option k=0 in sqlhosts. But it doesn't work. The problem is still there. Art S. Kagel <kagel@bloomberg.net> wrote in message news:3909C250.18060620@bloomberg.net... > > Lyo wrote: > > > I am programming with ESQL-C recently.When i test my program,i find it halt > > itself,and i kill it(i think the connection to database was without normal > > close).I test it again(just run it again),it failed to connect to > > database,the message is "IX000:Network driver cannot open the network > > device".I don't know why. > > The only way to conenct the database is reboot the Unix,or run my program on > > another PC,but can only connect successfully once. > > How can i deal with it? > > > > Some UNIXes have trouble releasing the network port if a connection is > not closed properly. You need to adjust the keepalive parameter in the > sqlhosts file (and doing so to the network drivers also in the kernel will > help). Usually the open connection will be closed by the network drivers > after a period that varies from 15 minutes to an hour automatically so if > waiting, as well as rebooting, finally clears the problem then you can be > sure that the keepalive is it. Keepalive is maintained by the "k=" sqlhosts > line option, I do not remember the kernel parameter. > > Art S. Kagel > > >