On Tue, Mar 25, 2003 at 09:55:40AM -0700, Ken Miller wrote:
> I've got a strange problem with Apache::Session, and DBD::Oracle:
> 
> [Tue Mar 25 10:01:03 2003] [error] Invoking view: /security/list-users.html
> --> DBH LONG READ LEN: 256000 <--
> --> STATEMENT LONG READ LEN: 256000 <--
> [Tue Mar 25 10:01:05 2003] [error] Error trying to access session:
> DBD::Oracle::st fetchrow_arrayref failed: ORA-24345: A Truncation or null
> fetch error occurred (DBD ERROR: ORA-01406 error on field 1 of 1, ora_type
> 8, LongReadLen too small and/or LongTruncOk not set) [for statement ``
>                 SELECT a_session FROM sessions WHERE id = ? FOR UPDATE''
> with params: :p1='eb9d7cb85362e686ed6dacb5bd9caea8']) at
> /home/miller/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Oracle.pm line
> 83.
> 
> I looked at the session in question I was tring to fetch, and found that the
> length of the session was 8718 bytes.  8718 is a *lot* less than 256000
> bytes, so there should not have been an error.

But 256000 is a lot more than 64K and that _might_ be the problem
(on some Oracle and/or DBD::Oracle versions).

Try setting LongReadLen to 64000.

Also try fetching DBD::Oracle 1.13 (or 1.14 in a day or so) and run the
test suite. The t/long.t test should pass and thus demonstrate that
LongReadLen can be set higher than 64K.

> The strange thing is that this error is not consistent.  I can populate the
> session with a large set of data, access a few other pages (which in turn
> causes the session to be loaded), and then it fails. Or, it can fail on the
> next request after loading the session.

It's always possible there's a deeper bug lurking in there, but I'd
need a small self-contained test case in order to find it.

Tim.

Reply via email to