Informix disconnect perl program
Posted in 2000
Topics: General Discussion
Hi, I try to insert data from flat files into tables via a perl script. Informix : 7.3 DS. Perl connect to informix via DBI and DBD::informix downloaded from cpan. I've got a file which contains 50 000 lines which represent 50 000 records to be inserted in the table. Files with data less than 1000 can be successfully inserted but when I try to insert a big file ( 50 000 lines), Informix stops the connection after inserting about 5 000 lines and I've got this error : -25580 : or -1803 : Connection does not exist Any idea? Thanks, Sent via Deja.com http://www.deja.com/ Before you buy.
This is a bug in 7.30 UC xx for Linux. We have the same behaviour. We are just evaluating 9.21 and the problem seems to be gone. Peter saidml@caramail.com wrote: > > Hi, > I try to insert data from flat files into tables via a perl script. > Informix : 7.3 DS. > Perl connect to informix via DBI and DBD::informix downloaded from cpan. > I've got a file which contains 50 000 lines which represent 50 000 > records to be inserted in the table. > Files with data less than 1000 can be successfully inserted but when I > try to insert a big file ( 50 000 lines), Informix stops the connection > after inserting about 5 000 lines and I've got this error : > > -25580 : > or > -1803 : Connection does not exist > Any idea? > > Thanks, > > Sent via Deja.com http://www.deja.com/ > Before you buy.
On Mon, 23 Oct 2000 saidml@caramail.com wrote: >I try to insert data from flat files into tables via a perl script. >Informix : 7.3 DS. >Perl connect to informix via DBI and DBD::informix downloaded from cpan. >I've got a file which contains 50 000 lines which represent 50 000 >records to be inserted in the table. OK; did you consider using one of the specialist loader tools, such as DB-Load? That's not to say that it shouldn't work with Perl, but maybe the alternatives would also work. >Files with data less than 1000 can be successfully inserted but when I >try to insert a big file ( 50 000 lines), Informix stops the connection >after inserting about 5 000 lines and I've got this error : > >-25580 : >or >-1803 : Connection does not exist >Any idea? There's a bug somewhere. Peter Eckhardt suggested you might be on Linux as he had encountered a similar problem, and an upgrade of the server would do the trick. That may well be a valid suggestion. I would still be curious to see your Perl code to see whether you might be running foul of a bug in DBD::Informix. The most likely trouble would actually be a memory leak; there is a memory leak test harness (tuned to Solaris) in DBD::Informix::TestHarness, and one of the things I'd probably do (eventually - after the Informix User Conference this week) is verify that you don't run into a memory leak. You don't need to provide the data set, but I would like the relevant schema. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"
> There's a bug somewhere. Peter Eckhardt suggested you might be on
Linux
> as he had encountered a similar problem, and an upgrade of the server
> would do the trick. That may well be a valid suggestion.
>
> I would still be curious to see your Perl code to see whether you
might
> be running foul of a bug in DBD::Informix. The most likely trouble
> would actually be a memory leak; there is a memory leak test harness
> (tuned to Solaris) in DBD::Informix::TestHarness, and one of the
things
> I'd probably do (eventually - after the Informix User Conference this
> week) is verify that you don't run into a memory leak. You don't need
> to provide the data set, but I would like the relevant schema.
>
> --
> Yours,
> Jonathan Leffler (Jonathan.Leffler@Informix.com) #include
<disclaimer.h>
> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
> "I don't suffer from insanity; I enjoy every minute of it!"
>
>
Hi,
As I'm new in Informix world, I only test to insert data via dbaccess
using : "load from 'client.txt' delimiter '|' insert into client_essai"
The insertion is successful and very fast.(53776 data inserted in less
than 3sec).
But it's not what I want.
Data come from another server via FTP every night and an a cron start
the conversion before inserting the data in tables. There are also a log
file describing all errors found in the files ( like : integrity error,
data missing, wrong format,....).
So I thought that perl could do this work easily but the problem appears
with big files.
I tried to disconnect and reconnect each 500 rows but the problem is the
same.
Another solution is to use smaller files before doing the conversion.
I'm on a RH6.2 (2.2.17 Kernel).
because of the size of the scripts, I can send you the scripts in a zip
file, if you agree with.
Thanks,
Sent via Deja.com http://www.deja.com/
Before you buy.