Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a rails project run on the thin server(1.3.1) on a ubuntu server. I ssh to the server and start thin with command 'thin start -C config/thin.yml', following the thin.yml,

port: 3000
log: log/thin.log
timeout: 30
chdir: /home/byht/56platform/dev/tracker
environment: production
servers: 1
daemonize: true

After thin starts successfully, I visit the project and it works well. Then, I close the terminal, I can also visit the pages that have been visited, but when I visit the pages that not been visited before closing ssh terminal, a "500" error appears on the page. I didn't find the error messages in the log file.

I have tried start thin with nohup and sudo, but they are useless.

I sign in the ubuntu server locally, then the problem disappears. But I need sign in the server to stat thin with ssh when I'm home.

share|improve this question
    
Daemonize the thin instance with the -d option. –  karatedog Jul 6 '12 at 12:33
    
"daemonize: true" is the same as "-d" –  Keating Wang Jul 6 '12 at 14:32

1 Answer 1

If you want a program to keep running after closing the terminal, than you can try screen to run a kind of virtual terminal that keeps active on the server, and can be used from another location at another time

screen

will enter this terminal. Control a-d will detach it and

screen -r

will enable you to re-use it, with your program still running.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.