[erlang-questions] Yaws process died when executing read_file

CGS cgsmcmlxxv@REDACTED
Wed Oct 19 13:34:24 CEST 2011


Hi Martin,

I suppose the access permission error is coming more from the number of 
threads accessing that file and less from OS.

Check your yaws.conf and override some default variables, especially 
max_connections, keepalive_maxusers and process_options variables (or 
fail_on_bind_err to check if it YAWS or external sources of limitation). 
For more information look here: 
http://yaws.hyber.org/yman.yaws?page=yaws.conf.

Also, it wouldn't be such a bad idea to monitor your system resources 
while setting up limits for connections.

And the last thing, if you feel your hardware system is not used at its 
maximum capacity, try running multiple YAWS systems.

I hope it will help.

Cheers,
CGS


On 10/19/2011 12:46 PM, Martin Dimitrov wrote:
> I do performance testing of our Erlang application with OpenSTA. The
> test runs with 300 virtual users. At some point the following errors
> start popping up:
>
> Yaws process died: {{badmatch,{error,eacces}},
>                  [{yaws_server,ut_read,1},
>                   {yaws_server,deliver_dyn_file,5},
>                   {yaws_server,aloop,3},
>                   {yaws_server,acceptor0,2},
>                   {proc_lib,init_p_do_apply,3}]}
>
> The call file:read_file(UT#urltype.fullpath) crashes in function
> ut_read(UT). I recompiled the module and printed the context. The error
> is eacces and UT holds:
>
> {urltype,yaws,
>                            {file_info,14088,regular,read_write,
>                                {{2011,9,13},{11,51,42}},
>                                {{2011,10,17},{17,59,44}},
>                                {{2011,3,16},{13,18,58}},
>                                33206,1,3,0,0,0,0},
>                            "/handler.yaws",
>                            "c:/Temp/harmony/script/../www/handler.yaws",
>                            "/",undefined,undefined,"text/html",
>                            "/handler.yaws",undefined}
>
> The file handler.yaws is the entry point of our app and is called on
> every request. When I run the test with 100 or less virtual users I
> don't see these errors. So how can it be "Missing permission for reading
> the file, or for searching one of the parent directories" as the error
> is described in the file:read_file documentation?
>
> Thanks in advance.
>
> Martin
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list