tvilliers wrote:
I have a perl script, using the DBI and DBD::Informix to unload data to
a flat file. To improve network traffic, the Informix specific
FET_BUF_SIZE environment variable is set to "16k". This causes the script
to die with "Memory fault". When FET_BUF_SIZE is unset, the script runs
fine. I've tried to set the DBI's "LongReadLen" attribute, but it doies
not seem to make any difference.

Is this a DBI specific problem?

uname -sr gives "Linux 2.4.10-4GB" and perl -v "5.6.1" with "Compile-time
options: USE_LARGE_FILES". The DBI version is "1.19".

DBD::Informix is documented to ignore LongReadLen - so it wouldn't make any odds whatsoever.


FET_BUF_SIZE is peculiar to Informix; it is not something DBI should be affected by.

You're using fairly old versions of Perl and DBI. You give no indication of the version of DBD::Informix - so presumably 2003.04 (if not, start thinking hard about using it) - nor any indication of the version of CSDK (which is probably the most important piece of data).

Succinctly, I don't know what the problem is, but my suspicion is that the conversion of "16k" is failing and the zero is being used for the buffer size. Poor error control (in CSDK - not your code, or mine), but nevertheless what I suspect. In the CSDK 2.80 ESQL/C Programmer's Reference Manual (5423a.pdf), on p14-22, it illustrates the use of a 20,000 byte FET_BUF_SIZE with:

setenv FET_BUF_SIZE 20000

Apart from the heathen shell it is using, it is moderately clear that to use 16 KB, you need to do:

export FET_BUF_SIZE=16384

You might be using a 16 byte buffer, or a 0 byte buffer; neither is very likely to be conducive to good performance.

--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) #include <disclaimer.h>
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/




Reply via email to