Arc Forumnew | comments | leaders | submitlogin
4 points by sacado 6133 days ago | link | parent

What do you mean by "pop into the background" ? There are 2 ways to achieve this :

  (thread (nsv 8080))
This one gets you back to the REPL, so that you can maintain your app as it is running.

  mzscheme -m -f as.scm < script.arc &
This one (under Unix) runs the script and gives you back to the prompt, while your server is running.

What kind of errors do you get ?



1 point by antiismist 6131 days ago | link

Is there a standard graceful way of stopping a background process?

I could: launch nsv as a thread in the background, then fg it back, then use (quit) in the repl. But is there a better way to do this? Does (quit) shut down the server gracefully?

-----

3 points by almkglor 6131 days ago | link

(quit) shuts down gracefully AFAIK. If you're not confident of it, use (= quitsrv* t) and make one request from the server.

-----

1 point by marcos 6132 days ago | link

upon further reading through the forum, i figured out that the timeouts were a side-effect of the 'date problem' but because i hadn't been quick on the uptake, i had no idea that was what i was even looking for.

moving to anarki/arc-wiki stable fixed that. thanks for putting up with me, everyone!! :)

-----

1 point by marcos 6133 days ago | link

you are my hero, i hadn't seen the thread procedure documented in the tutorial.

the problem manifests itself as either 502 errors (served via mod_proxy_balancer) or "server dropped the connection" errors, but the thread business helps immensely.

-----