I do performance testing of our Erlang application with OpenSTA. The test runs with 100 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 test continues to run. I cannot find info about this error. Does eacces
mean Error accessing a resource
?
EDIT: As pointed out by @Muzaaya Joshua
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}
This 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 read_file documentation?
Thanks in advance.
Martin
I managed to fix this errors by increasing the file size of the allowed in cache files in the YAWS configuration max_size_cached_file
. This made our .yaws file to be loaded in memory and not accessess with file:read_file
all the time. Hopefully this will save someone else couple of hours (or days :))