Re: fetch blocks in child process
Posted in 1999
The child MUST close the database connection it has inherited from its parent and open a new one of its own. The best way, if the parent is to continue using the connection, is to call the sqlexit() function in the child code immediately following the fork() call then issue a new CONNECT TO or DATABASE statement. Art S. Kagel altpeter_rueb@my-deja.com wrote: > > Hello everybody, > our situation is as follows: > 1) a parent process opens a connection to an informix database > 2) then it forks a child > 3) this child tries to read a collection of rows from a database table > by subsequent fetch-commands using the parent's db-handle > 4) exactly after the 9th fetchrow_arrayref the process blocks although > a lot of rows remain to be examined; no cpu-time is consumed > The same happens with fetchrow_array; however by reading the whole > bunch of rows with one single fetchall_arrayref into a list and looping > over it works as excepted. > Nothing unusual can be found in either the database server log nor in > the DBI-trace (the programm enters dbd_ix_st_fetch but never returns). > Does anyone had encountered similar problems ? > > Our environment: > Informix/Linux IDS 7.30 U > SuSE Linux 6.0 (kernel 2.0.36) > DBD-Informix 0.60 > DBI 1.06 > > Herbert Altpeter-Rüb > > Sent via Deja.com http://www.deja.com/ > Share what you know. Learn what you don't.