RT3 Truncating attachments

Hi everyone,

I’ve read through attachment related posts, but they don’t seem to apply to my case.

We are running RT 3.0.4/postgres/RedHat 8.0 configuration. Maximum attachment size is set to 10MB, TruncatingLongAttachments is set to ‘undef’. All the attachments of any type sent to RT via email, end up truncated to approximately 4k (in tests I did it varied from 3.8k to 4.8k).

I’d appreciate any suggestions.
Thanks, Kris

Krzysztof Jagiello wrote:

Hi everyone,

I’ve read through attachment related posts, but they don’t seem to
apply to my case.

We are running RT 3.0.4/postgres/RedHat 8.0 configuration. Maximum
attachment size is set to 10MB, TruncatingLongAttachments is set to
’undef’. All the attachments of any type sent to RT via email, end up
truncated to approximately 4k (in tests I did it varied from 3.8k to
4.8k).

I’d appreciate any suggestions.
Thanks, Kris

In August there were posts on mailing list about Postgres internal
limits. Also it was in RT docs somewhere.
Look at pg manual.
mySQL have such limit.
Best regards. Ruslan.

Krzysztof Jagiello wrote:

Hi everyone,

I’ve read through attachment related posts, but they don’t seem to
apply to my case.

We are running RT 3.0.4/postgres/RedHat 8.0 configuration. Maximum
attachment size is set to 10MB, TruncatingLongAttachments is set to
’undef’. All the attachments of any type sent to RT via email, end up
truncated to approximately 4k (in tests I did it varied from 3.8k to
4.8k).

I’d appreciate any suggestions.
Thanks, Kris

In August there were posts on mailing list about Postgres internal
limits. Also it was in RT docs somewhere.
Look at pg manual.
mySQL have such limit.
Best regards. Ruslan.

I have a similar setup and use MySQL. I experience the same problem. Any
ideas how to fix it for MySQL?

Thanks
Danie

Danie Marais wrote:

Krzysztof Jagiello wrote:

Hi everyone,

I’ve read through attachment related posts, but they don’t seem to
apply to my case.

We are running RT 3.0.4/postgres/RedHat 8.0 configuration. Maximum
attachment size is set to 10MB, TruncatingLongAttachments is set to
’undef’. All the attachments of any type sent to RT via email, end up
truncated to approximately 4k (in tests I did it varied from 3.8k to
4.8k).

I’d appreciate any suggestions.
Thanks, Kris

In August there were posts on mailing list about Postgres internal
limits. Also it was in RT docs somewhere.
Look at pg manual.
mySQL have such limit.
Best regards. Ruslan.

I have a similar setup and use MySQL. I experience the same problem. Any
ideas how to fix it for MySQL?

Thanks
Danie

cat /etc/my.cnf

[mysqld]
max_allowed_packet = 16M

Krzysztof Jagiello wrote:

Hi everyone,

I’ve read through attachment related posts, but they don’t seem to
apply to my case.

We are running RT 3.0.4/postgres/RedHat 8.0 configuration. Maximum
attachment size is set to 10MB, TruncatingLongAttachments is set to
‘undef’. All the attachments of any type sent to RT via email, end up
truncated to approximately 4k (in tests I did it varied from 3.8k to
4.8k).

I’d appreciate any suggestions.
Thanks, Kris

In August there were posts on mailing list about Postgres internal
limits. Also it was in RT docs somewhere.
Look at pg manual.
mySQL have such limit.
Best regards. Ruslan.

RedHat 8 comes with postgresql 7.2, which has no practical limit
on the size of a text field (ok, there’s a limit, but it’s in the
multi-gigabyte range (2 or 4GB)) - at least according to the PG
documentation for 7.2.

However, that’s not to say that the perl interface to postgres might
not have a limit - has anyone looked at that?

The attachments are stored in postgres as ‘text’ fields, which have
the ‘unlimited’ size capacity mentioned above in PG 7.2.

Steve Wampler sbw@tapestry.tucson.az.us

Krzysztof Jagiello wrote:

Hi everyone,

I’ve read through attachment related posts, but they don’t seem to
apply to my case.

We are running RT 3.0.4/postgres/RedHat 8.0 configuration. Maximum
attachment size is set to 10MB, TruncatingLongAttachments is set to
’undef’. All the attachments of any type sent to RT via email, end up
truncated to approximately 4k (in tests I did it varied from 3.8k to
4.8k).

I’d appreciate any suggestions.
Thanks, Kris

In August there were posts on mailing list about Postgres internal
limits. Also it was in RT docs somewhere.
Look at pg manual.
mySQL have such limit.
Best regards. Ruslan.

RedHat 8 comes with postgresql 7.2, which has no practical limit
on the size of a text field (ok, there’s a limit, but it’s in the
multi-gigabyte range (2 or 4GB)) - at least according to the PG
documentation for 7.2.

However, that’s not to say that the perl interface to postgres might
not have a limit - has anyone looked at that?

The attachments are stored in postgres as ‘text’ fields, which have
the ‘unlimited’ size capacity mentioned above in PG 7.2.

I check Krzysztof’s RT database and the problem doesn’t appear to be
with the database itself - there are certainly large attachments
in the database:

rt3=# select char_length(content) from attachments where char_length(content) > 500000;
char_length
565043
565043
565043
(3 rows)

And, using a non-perl program, I can read out such large entries.

In fact, using the web interface I can create tickets with large
attachments with no problem - and later download of the attachment
from the web page also works fine. So the problem appears to be
with the email interface - not with the database.

Any ideas from the RT list?

Steve Wampler {sbw@tapestry.tucson.az.us}
The gods that smiled upon your birth are laughing now. – fortune cookie

Krzysztof Jagiello wrote:

Hi everyone,

I’ve read through attachment related posts, but they don’t seem to
apply to my case.

We are running RT 3.0.4/postgres/RedHat 8.0 configuration. Maximum
attachment size is set to 10MB, TruncatingLongAttachments is set to
’undef’. All the attachments of any type sent to RT via email, end
up

truncated to approximately 4k (in tests I did it varied from 3.8k to
4.8k).

I’d appreciate any suggestions.
Thanks, Kris

In August there were posts on mailing list about Postgres internal
limits. Also it was in RT docs somewhere.
Look at pg manual.
mySQL have such limit.
Best regards. Ruslan.

RedHat 8 comes with postgresql 7.2, which has no practical limit
on the size of a text field (ok, there’s a limit, but it’s in the
multi-gigabyte range (2 or 4GB)) - at least according to the PG
documentation for 7.2.

However, that’s not to say that the perl interface to postgres might
not have a limit - has anyone looked at that?

The attachments are stored in postgres as ‘text’ fields, which have
the ‘unlimited’ size capacity mentioned above in PG 7.2.

I check Krzysztof’s RT database and the problem doesn’t appear to be
with the database itself - there are certainly large attachments
in the database:

rt3=# select char_length(content) from attachments where
char_length(content) > 500000;
char_length

   565043
   565043
   565043

(3 rows)

And, using a non-perl program, I can read out such large entries.

In fact, using the web interface I can create tickets with large
attachments with no problem - and later download of the attachment
from the web page also works fine. So the problem appears to be
with the email interface - not with the database.

Any ideas from the RT list?

I can indeed confirm exactly that with my MySQL setup. I can place large
attachments in the database through the web interface and they get mailed
just fine. But you cannot mail a large (above 4k) attachment. It ends up
corrupted (or at least truncated) in the database. So I’m still stumped.

I can indeed confirm exactly that with my MySQL setup. I can place
large

attachments in the database through the web interface and they get
mailed

just fine. But you cannot mail a large (above 4k) attachment. It ends
up

corrupted (or at least truncated) in the database. So I’m still
stumped.

What version of mod_perl are you using?

mod_perl-1.99_07-5
perl-5.8.0-88

Danie Marais wrote:

mod_perl-1.99_07-5
perl-5.8.0-88

Thanks for playing. Please try again.

Seriously:- you’re using a badly built beta version of a moving target,
with that mod_perl.

While some people have made mod_perl 1.99 work with RT, it is (a)
strongly discouraged, and (b) all but impossible using any RedHat
shipped mod_perl package. Build mod_perl yourself from latest
sources if you must. Better still, use apache 1.3 with mod_perl 1,
or fastcgi under apache 2.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

Danie Marais wrote:

mod_perl-1.99_07-5
perl-5.8.0-88

Thanks for playing. Please try again.

Seriously:- you’re using a badly built beta version of a moving target,
with that mod_perl.

While some people have made mod_perl 1.99 work with RT, it is (a)
strongly discouraged, and (b) all but impossible using any RedHat
shipped mod_perl package. Build mod_perl yourself from latest
sources if you must. Better still, use apache 1.3 with mod_perl 1,
or fastcgi under apache 2.

My intention was to use fastCGI under apache2, but I cannot get the mail to
work properly. The only way I could get the mail to work (almost) was using
mod_perl. Here is my fastcgi setup in apache:

<VirtualHost *>
DocumentRoot /opt/rt3/share/html
ServerName rtt.attix5.com
FastCgiIpcDir /tmp
FastCgiServer /opt/rt3/bin/mason_handler.fcgi

Alias /NoAuth/images /opt/rt3/share/html/NoAuth/images/
AddDefaultCharset UTF-8
AddHandler fastcgi-script fcgi fpl fcg

ScriptAliasMatch (.*/)$     /opt/rt3/bin/mason_handler.fcgi$1
ScriptAliasMatch (.*\.html)$        /opt/rt3/bin/mason_handler.fcgi$1

I keep getting an error in apache saying fastCGI terminated with an error
255 when you try to send a mail to RT.

Danie

Danie Marais wrote:

My intention was to use fastCGI under apache2, but I cannot get the mail to
work properly. The only way I could get the mail to work (almost) was using
mod_perl. Here is my fastcgi setup in apache:

I keep getting an error in apache saying fastCGI terminated with an error
255 when you try to send a mail to RT.

What happens when you run the mason_handler.fcgi from the command line?
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

I can indeed confirm exactly that with my MySQL setup. I can place
large
attachments in the database through the web interface and they get
mailed
just fine. But you cannot mail a large (above 4k) attachment. It ends
up
corrupted (or at least truncated) in the database. So I’m still
stumped.

What version of mod_perl are you using?

mod_perl-1.99_07-5

That’s your problem. There’s a bug in mod_perl 1.99_07 that limits POST
requests to 3128 bytes. Upgrade to mod_perl-1.99_09 (or 10, now) and
you’ll be fine.

Good luck!
Mick Szucs mick@onramp.ca
Onramp Network Services Inc.

mod_perl-1.99_07-5

That’s your problem. There’s a bug in mod_perl 1.99_07 that limits POST
requests to 3128 bytes. Upgrade to mod_perl-1.99_09 (or 10, now) and
you’ll be fine.

Can someone point me (or send me) instructions for upgrading a RedHat 8
system to use mod_perl-1.99_10?
I’ve tried:

(1) Installing from rpms: no go (dependency problems)
(2) Installing from source: no go - RH8 doesn’t ship
with apr-config.
(3) Upgrading both httpd and mod_perl: requires about
a zillion other packages be upgraded also (openssl,
libapr0, apr, apr-util, mod_auth_mysql.c,
mod_auth_pgsql.c, etc.) and the result didn’t
start with ‘service httpd start’ because of an
undefined symbol in mod_perl.so.

Now, I’m sure it’s operator error, so if anyone can
give me some pointers I’d welcome them!

Thanks,
Steve
Steve Wampler sbw@tapestry.tucson.az.us

Can someone point me (or send me) instructions for upgrading a RedHat 8
system to use mod_perl-1.99_10?

You might grab the newer src rpms and rebuild them against your existing
apache/perl installation - this should work, but you might need to throw
a few extra packages on the system for a handful of dependencies.

Not sure how well you’ll do on a Redhat 8 system, but this worked well
enough on Redhat 9.

Mick Szucs mick@onramp.ca
Onramp Network Services Inc.

You might grab the newer src rpms and rebuild them against your existing
apache/perl installation - this should work, but you might need to throw
a few extra packages on the system for a handful of dependencies.

Not sure how well you’ll do on a Redhat 8 system, but this worked well
enough on Redhat 9.

Did it on RHL8, works fine.

Guillaume Perréal.

Responsable informatique,
Cemagref, groupement de Lyon,
France.

Tél: (+33) 4.72.20.87.87.
Fax: (+33) 4.78.47.78.75.
Site: http://www.lyon.cemagref.fr/