[erlang-questions] Yaws process died when executing read_file

Martin Dimitrov mrtndimitrov@REDACTED
Wed Oct 19 12:46:05 CEST 2011


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



More information about the erlang-questions mailing list