Giter Site home page Giter Site logo

Comments (7)

zerobearing2 avatar zerobearing2 commented on May 29, 2024

+1
having the same issue. my production is running passenger, therefore, would be ideal to run passenger standalone in dev for capability sakes. I have not dug into this very deep nor found work-around to get passenger-standalone playing nice with foreman either.

from foreman.

gerry3 avatar gerry3 commented on May 29, 2024

It has been working ok for me to just manually run passenger stop after exiting foreman (via ctrl-C), so maybe to automate that we could just add an after exit hook to foreman. It isn't properly exiting all of the passenger processes though (as I've mentioned).

from foreman.

ddollar avatar ddollar commented on May 29, 2024

Rolling into #94

from foreman.

joergschiller avatar joergschiller commented on May 29, 2024

I still have the issue that passenger won't stop on CTRL+C foreman. I'm on passenger 4.0.41 and foreman 0.63.0.

18:44:23 web.1    | *** ERROR ***
18:44:23 web.1    | The address 0.0.0.0:3000 is already in use by another process, perhaps another
18:44:23 web.1    | Phusion Passenger Standalone instance.

Running passenger stop will fix that.

I'm using the following fix that works for me, it might be helpful for those who find this issue via Google.

Procfile:

web: vendor/passenger.sh

vendor/passenger.sh:

#!/bin/bash
trap "passenger stop" SIGINT
passenger start

from foreman.

ddollar avatar ddollar commented on May 29, 2024

Does passenger start fork into the background? Does it have any option to keep it in the foreground?

from foreman.

joergschiller avatar joergschiller commented on May 29, 2024

No it doesn't fork into background. There is an option to daemonize it but it is not enabled per default.

$ passenger start
=============== Phusion Passenger Standalone web server started ===============
PID file: /home/j/git/tmp/pids/passenger.3000.pid
Log file: /home/j/git/log/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/

You can stop Phusion Passenger Standalone by pressing Ctrl-C.
Problems? Check     http://www.modrails.com/documentation/Users%20guide%20Standalone.html#troubleshooting
===============================================================================
App 3984 stdout:

I think it is an issue in passenger itself, they state in the release notes of passenger 4.0.19 that "When using Phusion Passenger Standalone with Foreman, pressing Ctrl-C in Foreman no longer results in runaway Nginx processes.". I'll file a bug there.

I just wanted to document a solution here as it is the first google result :)

from foreman.

haggen avatar haggen commented on May 29, 2024

+1 for this, it's very annoying. I tried @joergschiller solution but had no luck.

I'm launching foreman with nohup and as background job (&), may that's a hint to why it isn't working for me ?

from foreman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.