[rt-users] Attachments are dropped randomly from correspondence

Tilo Villwock tvillwock at codematix.de
Wed Oct 5 05:18:25 EDT 2016


we're struggling with a problem where attachments get randomly dropped 
from a submitted correspondence in a ticket.

we're using RT 4.4.1 in production on a RHEL 6 server with a PostgreSQL 
9.1 backend on another server. The application is NOT configured with 
external storage for attachments and as such - as per your documentation 
- everything is being base64 encoded and inserted into the database.

It also seems that uploading the attachments to the RT server works just 
fine because the previews (where applicable) work perfectly. However, on 
submit only a subset of the attachments apparently make it into the 
database. I've double checked this in the actual table in the database.

A few more observations:

* there is absolutely no error message in the logs (the level is set to 
debug) when files are being uploaded or the correspondence is submitted

* there seems no correlation whatsoever to the file type, file size or 
number of files that have been attached as we've tested multiple 
scenarios (pdfs, zip archives, images, text files) and they all randomly 
failed to be included

* there was one subscriber mail delivery error that occurred when 
attaching 8 images with a total size of ~20Mb (the error was reported as 
critical in the log, however, no further explanation)

We've upgraded from a previous version (4.2.10) and it worked perfectly 
before with the same setup. The following is our RT_SiteConfig.pm with 
credentials redacted:

Set( $rtname, '<rt-name>');
Set($LogToFile, 'debug');
Set($LogDir, '/var/log/rt');
Set($LogToFileNamed, "rt.log");
Set($WebPort, 443);
Set($WebPath, '/rt');
Set($WebDomain , '<domain>');
my $port = RT->Config->Get('WebPort');
      ($port == 443? 'https': 'http') .'://'
      . RT->Config->Get('WebDomain')
      . ($port != 80 && $port != 443? ":$port" : '')

Set($WebURL , $WebBaseURL . $WebPath . "/");
Set($Organization , "<org>");
Set($Timezone , 'Europe/Berlin');

Set($DatabaseType , 'Pg');
Set($DatabaseHost   , '<pg-server>');
Set($DatabaseRTHost , '<same-pg-server>');
Set($DatabasePort , '<non-standard-port>');

Set($DatabaseUser, "<user>");
Set($DatabasePassword, "<pw>");

Set($DatabaseName, "<dbname>");

Set($WebRemoteUserAuth, 1);
Set($WebRemoteUserEnv, "HTTP_REMOTE_USER");
Set($WebRemoteUserContinuous, 1);
Set($WebFallbackToRTLogin, 1);
Set($WebRemoteUserAutocreate, 0);

Set($UserAutocreateDefaultsOnLogin, 0);

Set($OwnerEmail , '<email>');

Set($MailCommand , 'sendmail');
Set($SendmailArguments , '<args>');

Set($MaxAttachmentSize , 10000000);
Set($RTAddressRegexp , '<regex>');

Set($CorrespondAddress , 'RT::CorrespondAddress.not.set');
Set($CommentAddress , 'RT::CommentAddress.not.set');

Set($TrustHTMLAttachments, 1);
Set($RecordOutgoingEmail, 0);

Set( %FullTextSearch,
      Enable     => 1,
      Indexed    => 1,
      Column     => 'ContentIndex',
      Table      => 'Attachments',

Set($SearchResultsAutoRedirect, 1);
Set($MaxInlineBody, 100000);

# You must install Plugins on your own, this is only an example
# of the correct syntax to use when activating them.
# Plugin( "RT::Extension::QuickDelete" );
# Plugin( "RT::Extension::CommandByMail" );


      DefaultFormat => 'day', # or week or month or quarter
      ShowOwner     => 1,
      ShowProgress  => 1,
      ShowDuration  => 1,

      # Configurable JSGantt options
      # CaptionType       => 'Resource',
      # ShowStartDate     => 1,
      # ShowEndDate       => 1,
      # DateInputFormat   => 'mm/dd/yyyy',
      # DateDisplayFormat => 'mm/dd/yyyy',
      # FormatArr         => q|'day','week','month','quarter'|,

      # define your own color scheme:
      # ColorScheme => ['ff0000', 'ffff00', 'ff00ff', '00ff00', 
'00ffff', '0000ff'],

      # we color owners consistently by default, you can disable it via:
      # ColorSchemeByOwner => 0,

      # you can specify colors to use, unspecified owners will be
      # assigned to some color automatically:
      # ColorSchemeByOwner => { root => 'ff0000', foo => '00ff00' },

      # if can't find both start and end dates, use this color
      NullDatesColor => 333,

      # to caculate day length
      WorkingHoursPerDay => 8,

      # used to set start/end if one exists but the other does not
      DefaultDays => 7,


The config variable 'WebRemoteUserEnv' is a modification of ours that 
simply allows us to use a different variable name than the previously 
hardcoded 'REMOTE_USER'.

I also realize that setting MaxAttachmentSize has currently no effect 
since neither TruncateLongAttachments nor DropLongAttachments are set. I 
believe this is simply a remainder of an older config iteration.

Has anyone run into the same difficulties? Am I missing something in the 
configuration? I wonder if this is somehow related to the new uploader 

Any pointers would be greatly appreciated.

Thanks in advance.

Best Regards

Tilo Villwock

codematix GmbH
Felsbachstr. 5-7
07745 Jena

email: tvillwock at codematix.de
phone: +49 (0)3641 30 38 58

More information about the rt-users mailing list