WebFaction
Community site: login faq

Hi, i have successfully deployed a live tornado server on webfaction. So far, things are looking great except for when the server process seems to randomly crash - leaving me with a Nginx Bad Gateway.

To start the server, I just issue the command: python <app>.py &.

Although I doubt that this is the problem, my first question is - is this the best way to start the server in general?

Looking at frontend/error logs, I see the following:

2011/02/01 12:05:34 [info] 22339#0: 1987531 client 66.220.149.248 closed keepalive connection 2011/02/01 12:12:21 [info] 29571#0: 1988861 client 66.220.149.251 closed keepalive connection

and

2011/02/02 03:26:08 [error] 25150#0: *2131247 connect() failed (111: Connection refused) while connecting to upstream, client: 173.251.18.198, server: app.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0 .0.1:26570/favicon.ico", host: "www.app.com"

It's hard to tell how frequent the outage has been, but twice is enough to concern me.

Does anyone have any ideas or suggestions as to what is going on?

Thanks!

asked 02 Feb '11, 09:01

webfactionUs...
111
accept rate: 0%

Neither of those lines point to what the specific cause is.

The first is just the client closing the connection and the second is what happens after your application has already stopped.

I checked our logs and it's definitely not being killed by us. When was the last crash?

(02 Feb '11, 09:09) David L ♦♦

I am not sure when the crash happened, but it was early this morning, seems like:

-rw-r--r-- 1 root root 13453 Feb 2 08:49 error_app.log

Is there any way to get more detailed trace about the python process? would i have to pipe any errors to an output file?

(02 Feb '11, 10:14) webfactionUs...

turns out, that logging out of ssh might have caused the problem. i started using nohup - but ended up installing python-daemon and starting the tornado server using that instead.

hopefully, this problem should be resolved. let me know what you think

permanent link

answered 02 Feb '11, 10:56

webfactionUs...
111
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×11
×9
×1

question asked: 02 Feb '11, 09:01

question was seen: 3,020 times

last updated: 02 Feb '11, 10:56

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM