Cannot sent files of 1MB or larger via REST reqs

Hi,

I’ve been using the REST api for some time to communicate RT with a custom
made web app.

I’m having problems sending files when their size approach 1MB.

The following lines show up in apache’s error logs when i attempt to upload
big files:

[Fri Mar 29 16:07:08 2013] [warn] [client 192.168.1.106] mod_fcgid: error
reading data, FastCGI server closed connection
[Fri Mar 29 16:07:08 2013] [error] [client 192.168.1.106] Premature end of
script headers: rt-server.fcgi

For smaller sizes it works perfectly, even with multiple files.

I understand this issue might have been caused in the web app (not RT) but
i just wanted
to know if someone could shed some light here. Are there any size (or
otherwise) limits
that i could change in RT’s (or apache) side?

Any help will be highly appreciated

Hugo Escobar

[image: AFS_logo.png]

Follow us on Facebook and Linked-In

[image: facebook-24x24.png]http://www.facebook.com/pages/Miami-FL/ASSOCIATION-FINANCIAL/64952991864
[image: linkedin-24x24.png] http://www.linkedin.com/companies/1006276

Hi,

I’ve been using the REST api for some time to communicate RT with a custom
made web app.

I’m having problems sending files when their size approach 1MB.

The following lines show up in apache’s error logs when i attempt to
upload big files:

[Fri Mar 29 16:07:08 2013] [warn] [client 192.168.1.106] mod_fcgid:
error reading data, FastCGI server closed connection
[Fri Mar 29 16:07:08 2013] [error] [client 192.168.1.106] Premature end
of script headers: rt-server.fcgi

For smaller sizes it works perfectly, even with multiple files.

Read the warning about mod_fcgid here:
http://bestpractical.com/rt/docs/latest/web_deployment.html#mod_fcgid

1MB isn’t the large or small default, but perhaps something else set
FcgidMaxRequestLen recently and you need to increase it.

Thank you Thomas. It seems to be going in the right direction. Just to let
you know, the message disappeared
since I Added FcgidMaxRequestLen to apache conf. The problem seems to be in
the db side,

[Fri Mar 29 20:30:23 2013] [warning]: DBD::mysql::rtuser 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)
[Fri Mar 29 20:30:23 2013] [warning]: RT::Handle=HASH(0x6e23eb8) 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.

DBIx::SearchBuilder::Handle::SimpleQuery(‘RT::Handle=HASH(0x6e23eb8)’,
‘INSERT INTO Attachments (Subject, ContentType, Filename, Head…’, ‘’,
‘application/octet-stream’, ‘some-1mb-file.pdf’, ‘Content-Type:
application/octet-stream; name="some-…’, ‘’, 127, 1645, …) called at
/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 350On Fri, Mar 29, 2013 at 4:24 PM, Thomas Sibley trs@bestpractical.comwrote:

On 03/29/2013 01:18 PM, Hugo Escobar wrote:

Hi,

I’ve been using the REST api for some time to communicate RT with a
custom
made web app.

I’m having problems sending files when their size approach 1MB.

The following lines show up in apache’s error logs when i attempt to
upload big files:

[Fri Mar 29 16:07:08 2013] [warn] [client 192.168.1.106] mod_fcgid:
error reading data, FastCGI server closed connection
[Fri Mar 29 16:07:08 2013] [error] [client 192.168.1.106] Premature end
of script headers: rt-server.fcgi

For smaller sizes it works perfectly, even with multiple files.

Read the warning about mod_fcgid here:
Web deployment - RT 5.0.5 Documentation - Best Practical

1MB isn’t the large or small default, but perhaps something else set
FcgidMaxRequestLen recently and you need to increase it.

Hugo Escobar

[image: AFS_logo.png]

Follow us on Facebook and Linked-In

[image: facebook-24x24.png]http://www.facebook.com/pages/Miami-FL/ASSOCIATION-FINANCIAL/64952991864
[image: linkedin-24x24.png] http://www.linkedin.com/companies/1006276

Thank you Thomas. It seems to be going in the right direction. Just to
let you know, the message disappeared
since I Added FcgidMaxRequestLen to apache conf. The problem seems to be
in the db side,

Check your MySQL max_allowed_packet value.