Well I "fixed" it by adding the following switches to yaws:

--heart --daemon --runmod booter

The heart of this [no pun intended] is the runmod switch. There is a
file booter.erl in the directory with a function start/0. When yaws is
starting up, it inspects the --runmod switch and runs the start/0
function inside of the booter.erl file. The start/0 function is the
famous boot/0 function in start.erl, renamed to conform with yaws
requirements.
Thus when the server is started, there is a heart process that keeps
it up and because of the --runmod switch, the application is always
available as long as the server is available.

Nii Amon

On Apr 8, 4:07 am, "Yariv Sadan" <[EMAIL PROTECTED]> wrote:
> I have never seen this kind of issue before. It sounds quite bizzare.
>
> On Mon, Mar 31, 2008 at 12:34 PM, nii amon <[EMAIL PROTECTED]> wrote:
>
> >  Hi
>
> >  I have an erlyweb application using the erlang2facebook API. When I
> >  start yaws, it runs without any problems. This is how I start yaws:
>
> >  /usr/bin/yaws -i --conf ./yaws.conf -pa /usr/lib/yaws/ebin/ -pa /usr/
> >  local/lib/erlang/lib/ -sname yawsserv
>
> >  I am able to start the application successfully with this start.erl
> >  script:
>
> >  -module(start).
> >  -export([boot/0, boot/1]).
>
> >  boot() ->
> >     boot(true).
> >  boot(false) ->
> >     compile();
> >  boot(true) ->
> >     mysql_start(),
> >     compile().
>
> >  mysql_start() ->
> >     erlydb:start(mysql, [{hostname, "localhost"},
> >                          {username, "username"},
> >                          {password, "password"},
> >                          {database, "databasename"}]).
>
> >  compile() ->
> >     erlyweb:compile("/path/to/app",
> >                     [{erlydb_driver, mysql},
> >                      {auto_compile, true}]).
>
> >  What happens is that yaws stays up for a while after I start the
> >  application and then it just dies silently without leaving any errors
> >  in the log files.
>
> >  Has anyone had such an issue with yaws/erlyweb before?
>
> >  Nii Amon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to