On 15 Jul 2010, at 15:02, André Walker wrote:
I'm developing my first "real world" Catalyst application, and all I have available to publish it is my shared hosting on Hostmonster. It is working, but it's dynamic fastcgi, which means that after about a minute of inactivity the process is killed, and then, to access it again, it takes *6 seconds* to load the page. This is incredibly annoying. And it's gonna be a very low traffic page, so everybody who access it will probably have to wait those 6 seconds.


Is there a way I can get static fastcgi to work there? I have ssh access. Or maybe trap the signal the server sends to kill my process? To speed up the startup would be awesome, is there a way to do it? Something like Module::Compile?


No, there isn't really.

Does your shared host web server do any caching? I.e. if you serve appropriate cache headers, then you could avoid this for most of your hits.

Otherwise, it's probably entirely possible to make a kludge for the front page with mod_rewrite - if you app is hit then it can write out the HTML to disk, and you can have a mod_rewrite rule to serve the static (cached) page if it's new enough.. Or do something more basic like /index.html being static, and including an <img> that you know is served from the app to wake the app up before the user clicks anything..

But the latter solutions are a lot of messing and application level work to do for little gain really.

You could also 'cheat', by getting a free pingdom account (which will monitor your apps uptime, and wake it up for this monitoring every 60 seconds).. Depending how aggressively your ISP is killing fcgi processes this could be enough to keep it hot all the time..

Other than that, I'd suggest that slicehosts or some other small VM provider are very cheap these days ;)

Cheers
t0m


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to