Question

I am using YAWS to serve my remote application. When ever there is a change in yaws.conf file i am restarting the server to make these changes in effect. I don't want to do this, because my application might crash if server is down for more than certain time.

So is there a way to load the new configuration file with out stopping the server, like live code update?

Was it helpful?

Solution

You can use the following command from an interactive shell to reload the Yaws config file without restarting the server:

yaws --hup --id ID

where the --id ID portion is optional — if you're running multiple Yaws instances, it lets you identify which particular Yaws server you want to reload.

OTHER TIPS

There's yaws_api:setconf(GC, SCList), mostly intended for running Yaws "embedded" (i.e., under one of your own supervisors instead of starting Yaws as a separate application). But when you do that, Yaws will still tear down all existing ports and connections in order to set up the new configuration. So the first question is: have you measured the time it takes to restart the whole Yaws application? It might be only slightly slower than reloading the configuration, in which case you would make your code more complicated without really gaining anything.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top