1

I'm hoping to find out how to tell upstart that meteor will fork more than twice?

I followed their instructions at http://upstart.ubuntu.com/cookbook/#how-to-establish-fork-count to count the forks and it reports 21 times.

This is kind of a non issue in that stop myapp and start myapp work as expected (they stop and start and do not hang). If its relevant, I am running this in an Ubuntu 12.04 LTS (64-bit) VM created w/ Vagrant .

#!upstart
# Upstart config for running the node application
description "myapp"
author      "My Company"

start on (filesystems and net-device-up IFACE=eth0)
stop on shutdown

respawn             # restart when job dies
respawn limit 5 60  # give up restart after 5 respawns in 60 seconds
chdir /vagrant

script
  exec sudo -u vagrant MONGO_URL=mongodb://localhost:27017/project meteor -p 4000
end script

Thoughts?

Mike Graf
  • 397
  • 1
  • 3
  • 14

1 Answers1

1

You shouldn't be using meteor run to host your application in any environment where you'd be using Upstart to manage the process.

meteor run is a development-only server, and is very inefficient.

Take a look at https://github.com/onmodulus/demeteorizer - you can use it to convert your Meteor.js app into a 'vanilla' Node.js app with a package.json, which you can then run on your Ubuntu VM and manage with Upstart.

  • This was asked long before we basically did as you said. We now convert to a standalone node.js app and use init.d scripts to manage the service. – Mike Graf Jun 12 '14 at 20:21