On Feb 2, 12:10 pm, Johannes Beigel <[email protected]>
wrote:
> On 02.02.2009, at 17:40, [email protected] wrote:
>
> > sudo mw-serve
>
> > which produces the following (partial) output:
>
> > 2009-02-02T11:19:52 mw-serve.info >> serving http on 0.0.0.0:8899
> > 2009-02-02T11:19:57 mwlib.serve.info >> Creating directory '/var/
> > cache/
>
[snip]
> [...]
>
> If it produces this output, at least one POST request (which triggered
> the rendering) must have worked.
Right, I was able to run the server whenever I didn't use the cache
option.
> > Attempts to run something like the following just fail silently
> > immediately.
> > sudo mw-serve --clean-cache=3 --logfile /var/log/mw-serve.log
>
> Does the command return with a return code ≠ 0 or what do you mean
> with "fail"? Does the logfile contain anything interesting?
It wouldn't create a log file. I'm not sure of the return code - but
now I suspect it was appropriately returning zero.
>
> A note, just in case (I'm sure you already know this): Running mw-
> serve with the option --clean-cache causes it to run once to clean all
> outdated cache files. The command is meant to be run repeatedly, e.g.
> in a cronjob.
SOLVED - I didn't know that --clean-cache would change the behavior of
the server that way. I thought it was a setting like how often
"garbage collection" would take place. Now I understand why my trying
to "configure" the cache cleanup was "failing" because --clean-
cache=HOURS will "clean cache files that have not been touched for at
least HOURS hours __and exit__" (my emphasis added to the --help
output) This would also mean --clean-cache is pretty much
incompatible with --daemonize because the former is meant to do it's
work and exit while the latter is meant to create a long-running
daemon.
> > This works:
> > sudo mw-serve --logfile /var/log/mw-serve.log --interface 0.0.0.0 --
> > port 8899 --daemonize
>
> What does "works" mean? Does the command successfully spawn a process
> and the process keeps running, but POST requests are rejected? Is the
> message "serving http on 0.0.0.0:8899" written to the logfile
> immediately after you've issued the command?
>
It works in every way :-)
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"mwlib" 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/mwlib?hl=en
-~----------~----~----~----~------~----~------~--~---