Hello,<div><br></div><div>My company is fairly new to using RT, about a half a year now, and we suddenly seem to be having an attachment issue. We are currently using RT 4.0.6 and have been unable to attach images larger than around 1 MB. We have previously been able to because I had increased the maximum attachment size in the RT_SiteConfig, http config, and mysql config files. We haven't recently made any updates to the system that I am aware of. </div>
<div><br></div><div>I have tried restarting the http and mysql services a couple times, but to no avail. I can still attach smaller image files, but 1MB seems to be about the limit. The error message seems to be "<span style="font-family:Helvetica;font-size:12px">Attachment insert failed: MySQL server has gone away". After the attachment insert query, it seems to also fail on a Scrip query but if the sql server HAS gone away, it comes right back after those two failures. The MySQL log doesn't appear to have anything useful from around that time.</span></div>
<div><span style="font-family:Helvetica;font-size:12px"><br></span></div><div><span style="font-family:Helvetica;font-size:12px">The FAQ suggests that if it is not the MaxAttachmentSize then it may be mod_security, but I don't believe we use that in our http config and I don't see anything about mod_security in the log.</span></div>
<div><span style="font-family:Helvetica;font-size:12px"><br></span></div><div><span style="font-family:Helvetica;font-size:12px">So it appears to be a MySql issue, but MySql doesn't think anything is going wrong. Below is the full log message from the error.</span></div>
<div><span style="font-family:Helvetica;font-size:12px"><br></span></div><div><p style="margin:0px;font-size:12px;font-family:Helvetica">[Wed Oct 17 18:20:08 2012] [warning]: DBD::mysql::st execute failed: MySQL server has gone away at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 587. (/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:587)</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica">[Wed Oct 17 18:20:08 2012] [warning]: RT::Handle=HASH(0x7797a60) couldn't execute the query 'INSERT INTO Attachments (Subject, ContentType, Filename, Headers, MessageId, Creator, Parent, Created, ContentEncoding, Content, TransactionId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 600.</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>DBIx::SearchBuilder::Handle::SimpleQuery('RT::Handle=HASH(0x7797a60)', 'INSERT INTO Attachments (Subject, ContentType, Filename, Head...', 'DH_Test_IMG_0092', 'application/octet-stream', 'DH_Test_IMG_0092', 'MIME-Version: 1.0\x{a}Subject: DH_Test_IMG_0092\x{a}X-Mailer: MIME-to...', '', 38, 5845, ...) called at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 350</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>DBIx::SearchBuilder::Handle::Insert('RT::Handle=HASH(0x7797a60)', 'Attachments', 'Subject', 'DH_Test_IMG_0092', 'ContentType', 'application/octet-stream', 'Filename', 'DH_Test_IMG_0092', 'Headers', ...) called at /usr/local/share/perl5/DBIx/SearchBuilder/Handle/<a href="http://mysql.pm">mysql.pm</a> line 36</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>DBIx::SearchBuilder::Handle::mysql::Insert('RT::Handle=HASH(0x7797a60)', 'Attachments', 'Subject', 'DH_Test_IMG_0092', 'ContentType', 'application/octet-stream', 'Filename', 'DH_Test_IMG_0092', 'Headers', ...) called at /usr/local/share/perl5/DBIx/SearchBuilder/Record.pm line 1292</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>DBIx::SearchBuilder::Record::Create('RT::Attachment=HASH(0x7d38bc0)', 'Subject', 'DH_Test_IMG_0092', 'Filename', 'DH_Test_IMG_0092', 'ContentType', 'application/octet-stream', 'Headers', 'MIME-Version: 1.0\x{a}Subject: DH_Test_IMG_0092\x{a}X-Mailer: MIME-to...', ...) called at /usr/local/rt/sbin/../lib/RT/Record.pm line 316</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Record::Create('RT::Attachment=HASH(0x7d38bc0)', 'TransactionId', 12268, 'ContentType', 'application/octet-stream', 'ContentEncoding', 'none', 'Parent', 5845, ...) called at /usr/local/rt/sbin/../lib/RT/Attachment.pm line 193</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Attachment::Create('RT::Attachment=HASH(0x7d38bc0)', 'TransactionId', 12268, 'Parent', 5845, 'Attachment', 'MIME::Entity=HASH(0x7e27b98)') called at /usr/local/rt/sbin/../lib/RT/Attachment.pm line 172</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Attachment::Create('RT::Attachment=HASH(0x7875a48)', 'TransactionId', 12268, 'Attachment', 'MIME::Entity=HASH(0x7e28690)') called at /usr/local/rt/sbin/../lib/RT/Transaction.pm line 543</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Transaction::_Attach('RT::Transaction=HASH(0x7d41d80)', 'MIME::Entity=HASH(0x7e28690)') called at /usr/local/rt/sbin/../lib/RT/Transaction.pm line 160</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Transaction::Create('RT::Transaction=HASH(0x7d41d80)', 'ObjectId', 155, 'ObjectType', 'RT::Ticket', 'TimeTaken', '', 'Type', 'Comment', ...) called at /usr/local/rt/sbin/../lib/RT/Record.pm line 1459</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Record::_NewTransaction('RT::Ticket=HASH(0x7e27df0)', 'Type', 'Comment', 'Data', 'No Subject', 'TimeTaken', '', 'MIMEObj', 'MIME::Entity=HASH(0x7e28690)', ...) called at /usr/local/rt/sbin/../lib/RT/Ticket.pm line 2243</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Ticket::_RecordNote('RT::Ticket=HASH(0x7e27df0)', 'DryRun', 0, 'BccMessageTo', '', 'CcMessageTo', '', 'NoteType', 'Comment', ...) called at /usr/local/rt/sbin/../lib/RT/Ticket.pm line 2103</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Ticket::Comment('RT::Ticket=HASH(0x7e27df0)', 'BccMessageTo', '', 'CcMessageTo', '', 'MIMEObj', 'MIME::Entity=HASH(0x7e28690)', 'TimeTaken', '', ...) called at /usr/local/rt/sbin/../lib/RT/Interface/Web.pm line 1859</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Commands::ProcessUpdateMessage('ARGSRef', 'HASH(0x7e074d8)', 'Actions', 'ARRAY(0x7def938)', 'TicketObj', 'RT::Ticket=HASH(0x7e27df0)') called at /usr/local/rt/share/html/Ticket/Display.html line 164</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Commands::__ANON__('TicketObj', 'RT::Ticket=HASH(0x7e27df0)', 'Articles-Include-Article-Named', '', 'UpdateCc', '', 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'SubmitTicket', ...) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7dffa78)', 'TicketObj', 'RT::Ticket=HASH(0x7e27df0)', 'Articles-Include-Article-Named', '', 'UpdateCc', '', 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', ...) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Request::comp(undef, undef, 'TicketObj', 'RT::Ticket=HASH(0x7e27df0)', 'Articles-Include-Article-Named', '', 'UpdateCc', '', 'Object-RT::Ticket-155-CustomField-5-Value', ...) called at /usr/local/rt/share/html/Ticket/Update.html line 328</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Commands::__ANON__('Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', 'Articles_Content', '', 'SubmitTicket', ...) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7cf7620)', 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', 'Articles_Content', '', ...) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Request::comp(undef, undef, undef, 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', ...) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 958</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Request::call_next('RT::Interface::Web::Request=HASH(0x7d9adb0)') called at /usr/local/rt/share/html/Ticket/autohandler line 19</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Commands::__ANON__('Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', 'Articles_Content', '', 'SubmitTicket', ...) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7dbf490)', 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', 'Articles_Content', '', ...) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Request::comp(undef, undef, undef, 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', ...) called at /usr/local/rt/sbin/../lib/RT/Interface/Web.pm line 568</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Interface::Web::ShowRequestedPage('HASH(0x7da6178)') called at /usr/local/rt/sbin/../lib/RT/Interface/Web.pm line 318</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Interface::Web::HandleRequest('HASH(0x7da6178)') called at /usr/local/rt/share/html/autohandler line 53</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Commands::__ANON__('Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', 'Articles_Content', '', 'SubmitTicket', ...) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x77e1848)', 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', 'Articles_Content', '', ...) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1300</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Request::comp(undef, undef, undef, 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', ...) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 484</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 484</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 436</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Request::exec('RT::Interface::Web::Request=HASH(0x7d9adb0)') called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 85</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 85</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Request::PSGI::exec('RT::Interface::Web::Request=HASH(0x7d9adb0)') called at /usr/local/share/perl5/HTML/Mason/Interp.pm line 345</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::Interp::exec(undef, undef, 'Object-RT::Ticket-155-CustomField-5-Value', 'Any', 'UpdateCc', '', 'Articles-Include-Article-Named', '', 'Articles_Content', ...) called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 48</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 48</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::PSGIHandler::invoke_mason('HTML::Mason::PSGIHandler::Streamy=HASH(0x76b2798)', 'HTML::Mason::FakeApache=HASH(0x7d8f938)', 'HASH(0x7db06a8)') called at /usr/local/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm line 52</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>HTML::Mason::PSGIHandler::Streamy::__ANON__('CODE(0x7d9ce70)') called at /usr/local/rt/sbin/../lib/RT/Interface/Web/Handler.pm line 263</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>RT::Interface::Web::Handler::__ANON__('CODE(0x7d9ce70)') called at /usr/local/share/perl5/Plack/Util.pm line 301</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>Plack::Util::__ANON__('CODE(0x7d9f158)') called at /usr/local/share/perl5/Plack/Handler/FCGI.pm line 130</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>Plack::Handler::FCGI::run('Plack::Handler::FCGI=HASH(0x7737568)', 'CODE(0x76ac918)') called at /usr/local/share/perl5/Plack/Loader.pm line 84</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>Plack::Loader::run('Plack::Loader=HASH(0x77373a0)', 'Plack::Handler::FCGI=HASH(0x7737568)') called at /usr/local/share/perl5/Plack/Runner.pm line 263</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>Plack::Runner::run('Plack::Runner=HASH(0x73229f0)', 'CODE(0x76ac918)') called at /usr/local/rt/sbin/rt-server.fcgi line 232</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica"><span class="Apple-tab-span" style="white-space:pre">      </span>eval {...} called at /usr/local/rt/sbin/rt-server.fcgi line 232 (/usr/local/share/perl5/Carp.pm:103)</p>

<p style="margin:0px;font-size:12px;font-family:Helvetica">[Wed Oct 17 18:20:08 2012] [critical]: Attachment insert failed: MySQL server has gone away (/usr/local/rt/sbin/../lib/RT/Attachment.pm:206)</p>
<p style="margin:0px;font-size:12px;font-family:Helvetica">[Wed Oct 17 18:20:08 2012] [critical]: Attachment insert failed: MySQL server has gone away (/usr/local/rt/sbin/../lib/RT/Attachment.pm:178)</p><p style="margin:0px;font-size:12px;font-family:Helvetica">
<br></p><p style="margin:0px;font-size:12px;font-family:Helvetica">I am unsure of what to look into next to try and fix the issue. Could somebody point me in the right direction?</p><p style="margin:0px;font-size:12px;font-family:Helvetica">
<br></p><p style="margin:0px;font-size:12px;font-family:Helvetica">Thanks,</p><p style="margin:0px;font-size:12px;font-family:Helvetica">David</p></div>