Getting a "413 Request entity too large" with the Passenger gem

177 views
Skip to first unread message

Randy Schmidt

unread,
Nov 29, 2013, 4:34:13 PM11/29/13
to phusion-...@googlegroups.com
Hey there,

I'm not sure if I'm using the correct terminology but I'm using the Passenger gem locally in prep for deploying to Heroku. I have one endpoint that accepts incoming email and with an attachment that is 2.6 mb, I get "413 Request entity too large". Since I don't think there is a way to have a configuration file with this version and it seems like there are only four options, how do I fix this? 

I don't see anything in the passenger log file to hint that something went wrong. 

Any help would be great, thank you!

testes

unread,
Dec 2, 2013, 3:27:02 AM12/2/13
to phusion-...@googlegroups.com
Hello

We have this software:

passenger 4.0.20 compiled with ruby 1.9.3 . This is the default ruby
Ruby 1.8.7
Apps working with 1.8.7 via PassengerRuby
apache


These 1.8.7 apps work fine until, we do not know at this moment, they
'lose' PassengerRuby directive . Then they fail because they are
trying to use default ruby (1.9.3) instead the specified one in
PassengerRuby for the vhost

If apache is restarted, then app woks fine again.

This issue is hard to replicate , it happens 'sometimes'. We have
seen it with rails2 apps and with rails3 apps

App vhost configuration example:

RailsBaseURI /
PassengerAppRoot /user/path/app
SetEnv GEM_PATH /user_path_gems
SetEnv GEM_HOME /user_path_gems
PassengerRuby /path_to_ruby_187


Example error: ( it changes with the app, ):

An error occured while starting up the preloader
Error page:
(<unknown>): did not find expected node content while parsing a block
node at line 183 column 9 (Psych::SyntaxError)


After restarting apache, app works.

Any clue about this?

Thanks.

2013/11/29, Randy Schmidt <m...@r38y.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Phusion Passenger Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phusion-passen...@googlegroups.com.
> To post to this group, send email to phusion-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/phusion-passenger.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/phusion-passenger/c436d9c2-def9-46b5-bc72-a2a3b369eefe%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

testes

unread,
Dec 2, 2013, 3:29:53 AM12/2/13
to phusion-...@googlegroups.com
Hello,

Ouch

Sorry, bad thread. Ignore my last mail in this thread.

2013/12/2, testes <elchic...@gmail.com>:

Tinco Andringa

unread,
Dec 2, 2013, 8:14:31 AM12/2/13
to phusion-...@googlegroups.com
Hi Randy,

You can use the following guide:

http://www.modrails.com/documentation/Users%20guide%20Standalone.html#_advanced_configuration

To apply this configuration:

client_max_body_size 2M;

You can set the 2M to something higher that is reasonable for e-mail,
like perhaps 15M or 20M. The configuration needs to be inside a http,
server or location block.

Let me know if that works out for you.

Kind regards,
Tinco
Reply all
Reply to author
Forward
0 new messages