Thanks! It solves my first issue :)
Second problem is this message:

[error] Error in simple_bridge_request:make/2 - exit - 
{body_too_large,content_length}
[{mochicow_request,stream_body,5,[{file,"src/mochicow_request.erl"},{line,323}]},{mochicow_request,recv_body,2,[{file,"src/mochicow_request.erl"},{line,275}]},{simple_bridge_multipart,parse_multipart,1,[{file,"src/simple_bridge_multipart.erl"},{line,69}]},{simple_bridge_request,make_nocatch,2,[{file,"src/simple_bridge_request.erl"},{line,23}]},{simple_bridge_request,make,2,[{file,"src/simple_bridge_request.erl"},{line,14}]},{boss_web_controller_handle_request,handle_request,3,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,17}]},{mochicow_upgrade,upgrade,4,[{file,"src/mochicow_upgrade.erl"},{line,72}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,529}]}]

In mochiweb_request_bridge.erl
there is a constant defined:
-define(MAX_RECV_BODY,(1024*1024*10)).
and it is used to define MaxBody like this:
141     MaxBody = case application:get_env(mochiweb,max_request_size) of
142         undefined ->
143             ?MAX_RECV_BODY;
144         {ok, Max} when is_integer(Max) ->
145             Max;
146         Other ->
147             error_logger:warning_msg("Mochiweb Simple Bridge 
Configuration Error!  Unknown value for 'mochiweb' application variable 
'max_request_size': ~p. Expected: integer()
148             ?MAX_RECV_BODY
149     end,
mochiweb application is never started, so get_env/2 will always return 
undefined.
It probably means, that I have no way to configure it :/
I have to change the hardcoded value.

Do you think, that it should also be configured as vm argument?
In that case, I can create pull request.



W dniu wtorek, 11 marca 2014 11:13:17 UTC+1 użytkownik Burbas napisał:
>
> Hi,
>
> You can set the variables in boss.config:
>
> [{boss,       [
>                {path, "../ChicagoBoss"},
>                {vm_args, "-simple_bridge_max_post_size 20000 
> -simple_bridge_scratch_dir \"/..data\””}
> …
>
> Best regards,
> Niclas
>
>
> 11 mar 2014 kl. 11:11 skrev [email protected] <javascript:>:
>
> It seems, that simple bridge is not started as an application.
> It is used as a library, which means, that application:get_env will return 
> undefined,
> no matter what I put in application config.
> That is why it uses internally different function to get this value:
> init:get_argument(simple_bridge_max_post_size).
> But I don't know how to pass arguments to erlang during CB startup
>
> W dniu wtorek, 11 marca 2014 10:43:22 UTC+1 użytkownik mihawk napisał:
>>
>> should be configurable from boss.config like any otp app i guess 
>>
>> [
>> ...
>> {simple_bridge, [
>>      {simple_bridge_max_post_size, 150}
>> ] },
>>
>> Jess could confirm or not 
>>
>>
>>
>>
>> 2014-03-11 17:25 GMT+08:00 <[email protected]>:
>>
>>> Hi!
>>>
>>> I want to upload 150Mb files with CB.
>>> First problem I encountered is simple_bridge_max_post_size.
>>> It is set to 100Mb and it says:
>>> % Override with -simple_bridge_max_post_size SizeInMB
>>> I am not sure, how do I pass command line arguments to CB.
>>> Should I modify rebar start command? Is there a way to pass variable by 
>>> setting it in boss.config?
>>>
>>> For now, I've edited simple_bridge_multipart.erl
>>> -define (MAX_POST_SIZE, 1000).
>>>
>>> Second problem is body_too_large
>>> returned from mochicow_request:stream_body/4
>>> Should I increase some value here too?
>>>
>>>  BR,
>>> Tomasz Kowal
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "ChicagoBoss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> Visit this group at http://groups.google.com/group/chicagoboss.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/chicagoboss/6289b9d6-b920-4829-be9d-81f8ad80c3d0%40googlegroups.com<https://groups.google.com/d/msgid/chicagoboss/6289b9d6-b920-4829-be9d-81f8ad80c3d0%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "ChicagoBoss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> Visit this group at http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/chicagoboss/2f58edb8-8fb4-4d76-bff1-34718f23ecd1%40googlegroups.com<https://groups.google.com/d/msgid/chicagoboss/2f58edb8-8fb4-4d76-bff1-34718f23ecd1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/6bb76923-6a4c-4eb0-847e-b0cefcb8a3d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to