Code Monkey home page Code Monkey logo

Comments (8)

CamJN avatar CamJN commented on June 19, 2024

It is a common mistake to run passenger start as well as starting Nginx, did you do that?

from passenger.

acortes-kz avatar acortes-kz commented on June 19, 2024

@CamJN No, I didn't run passenger start. I was starting Nginx with sudo service nginx start, and that was triggering Passenger. How could I stop that service? Is it necessary for that service to be running?

from passenger.

CamJN avatar CamJN commented on June 19, 2024

The passenger-install-nginx-module script isn't a service, and is not necessary to be running once Passenger is setup. The question is how it is being started, as it shouldn't be if I understand your setup correctly.

How are you installing the passenger dynamic module?

from passenger.

acortes-kz avatar acortes-kz commented on June 19, 2024

I installed Passenger as a dynamic module following this documentation. In summary, it involves downloading the Nginx code and recompiling it with the Passenger module. During this process, there were no issues. I added load_module modules/ngx_http_passenger_module.so; to my nginx.conf file. If my Nginx service is stopped, passenger-status doesn't show any information. However, when I start my Nginx service with sudo service nginx start and run passenger-status again, I can see information about my website. I believe that when I start Nginx, Passenger is initiated automatically. Is that correct?

But I see passenger-install-nginx-module running when I execute htop and that slows down my server.

from passenger.

CamJN avatar CamJN commented on June 19, 2024

You are correct that when you start Nginx, Passenger is initiated automatically. However it shouldn't be running the passenger-install-nginx-module script. In fact passenger does not run that script automatically in any (non-CI) situation I can think of. You can grep the codebase to confirm that. Perhaps you are using something like Capistrano which might run that script for you? Or it's in a Rakefile somewhere? Depending on the size of your server's disk contents I'd suggest grepping your app's files for mention of the script or the whole server if that could be achieved in a reasonable amount of time.

from passenger.

acortes-kz avatar acortes-kz commented on June 19, 2024

I use Capistrano to perform deployments in my project, but no Capistrano processes or tasks were executed; only the installation of Passenger as a dynamic module was carried out. I assume that at some point, the compilation process did not close properly and remained hanging. Should I kill the process?

However, in Capistrano, I have these tasks to start Passenger. I believe they wouldn't be necessary to run them in each deployment, right?

namespace :passenger do
  task :stop, :only => { :passenger => true }, :on_no_matching_servers => :continue do ; end
  task :start, :only => { :passenger => true }, :on_no_matching_servers => :continue do ; end
  task :restart, :roles => :app, :only => { :passenger => true }, :on_no_matching_servers => :continue do
    run "touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end

from passenger.

CamJN avatar CamJN commented on June 19, 2024

Only the restart is necessary in each deployment. When you built the passenger dynamic nginx module, the passenger-install-nginx-module script shouldn't have been run, as it builds a statically linked nginx with passenger built in, plus the compilation is mostly handled by nginx's configure script and makefile. Perhaps check what the parent process is of the passenger-install-nginx-module script, or a few generations of parent processes? From what you've mentioned doing the script shouldn't have run at all, so it's really quite strange.

from passenger.

acortes-kz avatar acortes-kz commented on June 19, 2024

Indeed, this is quite strange. I have no idea what it could be; however, upon restarting my server, the process disappeared, and CPU consumption decreased.

from passenger.

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.