Giter Club home page Giter Club logo

Comments (3)

miyagawa avatar miyagawa commented on July 17, 2024

Starman::Server sets the process name to "starman master" and "starman worker". If multiple instances of starman run parallel on multiple ports this is confusing.

I fail to see how setting (actually, sort of prepending) names is more confusing that doing nothing at all, since otherwise you can't even figure out which process is the master/worker.

Starman keeps the original argument in the process names, so if you have two clusters, with --port 8080 and --port 8081, you'll see (scroll to the right):

✗ ps auxww | grep starman
miyagawa       73693   0.0  0.1  2437476   2688 s007  S+    9:56AM   0:00.00 starman worker /Users/miyagawa/dev/Plack/eg/dot-psgi/Hello.psgi --port 8080    
miyagawa       73692   0.0  0.1  2437476   2688 s007  S+    9:56AM   0:00.00 starman worker /Users/miyagawa/dev/Plack/eg/dot-psgi/Hello.psgi --port 8080    
miyagawa       73644   0.0  0.1  2437476   2740 s010  S+    9:56AM   0:00.00 starman worker /Users/miyagawa/dev/Plack/eg/dot-psgi/Hello.psgi --port 8081    
miyagawa       73643   0.0  0.1  2437476   2740 s010  S+    9:56AM   0:00.00 starman worker /Users/miyagawa/dev/Plack/eg/dot-psgi/Hello.psgi --port 8081    

I don't think they're confusing.

from starman.

nichtich avatar nichtich commented on July 17, 2024

On Linux the legacy process name, set with prctl(2) on assignment to $0 since Perl 5.14, is truncated to 16 bytes, so only 10 characters left if you include the word "master" or "worker". Sure one can toggle on display of full command line in tools like ps (option x) and top (press c) but it would be more convenient to quickly distinguish starman instances by process name instead of first scanning for the process ID or for the full command line (your comment "scroll to the right" shows the problem). e.g. to restart an application named "hello":

killall -HUP hello-master

from starman.

miyagawa avatar miyagawa commented on July 17, 2024

(your comment "scroll to the right" shows the problem).

That's just because i use the full output and the page width is short. I won't casually kill a process by just skimming the ps output anyway, since it's error prone (like you suggested, but see below)

e.g. to restart an application named "hello": killall -HUP hello-master

I would rather use a pid file option. (--pid and -D)

from starman.

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.