David Creelman <creelman.da...@gmail.com> writes: > Hi All, > I've setup a tiny server with ECL and I've quicklisp'ed the hunchentoot > package and it works well when I start it from the REPL. > However, If I try and run ECL as a background task which in turn is setting up > my hunchentoot instance, ECL will stop after a variable amount of time > (usually > 5-10 minutes). > > I'm new to serving up pages via CL and ECL, has anyone had any luck with this? > > Should I embed ECL into an exe that runs hunchentoot rather than running ECL? > > Or, if I run the server as a script, is there some way to get the script to > not need to interact with the REPL (which I think is the problem)?
It's better to start CL servers in detached terminals (you may use detachtty or screen). Then if there's a bug, you get a debugger in the terminal that you can remotely access and debug. This of course doesn't prevent you to try to catch errors and to handle them. IIRC, hunchentoot has options for that. I use something like: su -c 'screen -d -m -t server -c /home/USER/etc/screenrc \ bash -c "export LC_CTYPE=en_US.UTF-8 ; while sleep 2 ; do \ /home/USER/bin/SERVER ; done"' \ - USER in the server init.d files to start CL servers. Notice how the server process is restarted after 2 seconds if it ever crashes. detachtty is more lightweight. http://www.cliki.net/detachtty -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list