WebFaction
Community site: login faq

I recently managed to get an app up and running with web2py running through FastCGI and Lighttpd for a very low RAM footprint.

It's running great, save for the FastCGI process shutting down after going for a while with no use. When it shuts down I get 500 and 502 errors from my page. I have to shut down lighttpd, run nohup python2.7 fcgihandler.py & then restart lighttpd to get my web site back.

Is there a way to prevent the FastCGI process from shutting down?

asked 26 Nov '11, 21:05

HittingSmoke
4822030
accept rate: 8%


While technically a workaround, scheduling a cron task to periodically retrieve your website is a relatively popular solution:

wget -O - http://mysite.com > /dev/null 2>&1
permanent link

answered 26 Nov '11, 21:11

ryans ♦♦
5.0k83159
accept rate: 43%

Ahh! I hadn't thought of that. I thought of a cron job to run a restart script but decided it wasn't worth bothering with since there would be regular down time while in development.

Thanks. I'll keep this running until an actual solution is posted.

(26 Nov '11, 21:34) HittingSmoke

It appears that's not keeping the site up. I'm not sure exactly why it's going down. Lighttpd continues running but web2py w/ FastCGI doesn't.

(30 Nov '11, 17:54) HittingSmoke

Can you try running your fastcgi process in a screen(try the command "man screen" for more info) and see with exactly what error does that process shutdown?

(30 Nov '11, 19:51) neeravk
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:

×97
×24
×11
×4

question asked: 26 Nov '11, 21:05

question was seen: 2,892 times

last updated: 30 Nov '11, 19:51

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 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