3 ms·
Site down for me
by hassaderpdole 12y ago
Site down for me
- moron4hire 12y agoI haven't yet figured out how to get a Node.js process to start back up after the server has rebooted, and it looks like the traffic has been killed me a couple of times.
- victormx 12y agoYou can use PM2 pretty easy https://github.com/Unitech/pm2 https://github.com/Unitech/pm2
- VikingCoder 12y agoWhy do you need Node? Can't this just be statically served?
- moron4hire 12y agoIt mostly is, but I need it integrating with Stripe for the proprietary-license-that-I-totally-don't-expect people-to-buy-but-why-the-hell-not.
- r0nin 12y agoso nobody sees your page because of a feature you're not sure you want to have anyway...?
- axg 12y agoCan't you serve the main site statically, and have a dedicated page for the proprietary license and Stripe integration?
- moron4hire 12y agoThat's what I'm doing now. I thought I'd need to have both on the same port, but I was wrong.
- yeldarb 12y agoWe use forever for this: https://github.com/foreverjs/forever https://github.com/foreverjs/forever forever -w start yourFile.js That'll keep it up and going as a daemon and reboot it when files change :)
- moron4hire 12y agoNo, that's not the issue. I actually am using forever. I'm not entirely sure what the problem was, but I think the entire VPS was falling over, so when it comes back there is nothing to kick off forever. It is fixed, now, though, by letting Apache serve the static files. I'm not a sysadmin and I've never had anywhere near this much traffic before.
- yeldarb 12y agoAh, perhaps setting up an @reboot cron job to kick off the forever process would do the trick. Also, setting up a CDN in front of your static files is actually much easier than it sounds at first. You can just setup a Cloudfront distribution that uses your domain as its source; that should take off a lot of the load.