Comments (7)
+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.
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.
Rolling into #94
from foreman.
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.
Does passenger start
fork into the background? Does it have any option to keep it in the foreground?
from foreman.
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.
+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)
- Odd error message when you skip the 'start' command and include a -f
- Using RuboCop?
- issue killing subprocesses using `cd` with failure at startup HOT 1
- breakpoint vscode not work to Ruby
- After the foreman finishes, the ruby process continues to exist HOT 2
- Release 1.0? HOT 1
- About link is broken HOT 1
- Foreman does not terminate child process HOT 3
- Forman doesn't show errors and logs of Procfile commands HOT 3
- Change https://ddollar.github.com/foreman to https://ddollar.github.io/foreman on repo description link
- Port 5000 taken by Mac OSX HOT 1
- When launching rails via foreman, rails asset pipeline errors
- Support for x64-mingw-ucrt platform
- Version Optimize
- Document that Foreman secretly sets the PORT environment variable to 5000 HOT 1
- Error after running command "foreman start"
- foreman export systemd raises undefined method `exists?' for File:Class (NoMethodError) HOT 1
- Security CVE-2022-3874 HOT 4
- Usage Error: Unrecognized or legacy configuration settings found
- Ruby32-x64/lib/ruby/gems/3.2.0/gems/foreman-0.87.2/lib/foreman/engine.rb:201:in `kill': Invalid argument (Errno::EINVAL)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foreman.