1Mojolicious::Command::pUrseefrorCko(n3t)ributed Perl DocMuomjeonltiactiioouns::Command::prefork(3)
2
3
4
6 Mojolicious::Command::prefork - Pre-fork command
7
9 Usage: APPLICATION prefork [OPTIONS]
10
11 ./myapp.pl prefork
12 ./myapp.pl prefork -m production -p -l http://*:8080
13 ./myapp.pl prefork -l http://127.0.0.1:8080 -l https://[::]:8081
14 ./myapp.pl prefork -l 'https://*:443?cert=./server.crt&key=./server.key'
15 ./myapp.pl prefork -l http+unix://%2Ftmp%2Fmyapp.sock -w 12
16 ./myapp.pl prefork -l http://127.0.0.1:8080 -p 127.0/8 -p fc00::/7
17
18 Options:
19 -a, --accepts <number> Number of connections for workers to
20 accept, defaults to 10000
21 -b, --backlog <size> Listen backlog size, defaults to
22 SOMAXCONN
23 -c, --clients <number> Maximum number of concurrent
24 connections, defaults to 1000
25 -G, --graceful-timeout <seconds> Graceful timeout, defaults to 120.
26 -I, --heartbeat-interval <seconds> Heartbeat interval, defaults to 5
27 -H, --heartbeat-timeout <seconds> Heartbeat timeout, defaults to 50
28 -h, --help Show this summary of available options
29 --home <path> Path to home directory of your
30 application, defaults to the value of
31 MOJO_HOME or auto-detection
32 -i, --inactivity-timeout <seconds> Inactivity timeout, defaults to the
33 value of MOJO_INACTIVITY_TIMEOUT or 30
34 -k, --keep-alive-timeout <seconds> Keep-alive timeout, defaults to the
35 value of MOJO_KEEP_ALIVE_TIMEOUT or 5
36 -l, --listen <location> One or more locations you want to
37 listen on, defaults to the value of
38 MOJO_LISTEN or "http://*:3000"
39 -m, --mode <name> Operating mode for your application,
40 defaults to the value of
41 MOJO_MODE/PLACK_ENV or "development"
42 -P, --pid-file <path> Path to process id file, defaults to
43 "prefork.pid" in a temporary directory
44 -p, --proxy [<network>] Activate reverse proxy support,
45 defaults to the value of
46 MOJO_REVERSE_PROXY, optionally takes
47 one or more trusted proxy addresses or
48 networks
49 -r, --requests <number> Maximum number of requests per
50 keep-alive connection, defaults to 100
51 -s, --spare <number> Temporarily spawn up to this number of
52 additional workers, defaults to 2
53 -w, --workers <number> Number of workers, defaults to 4
54
56 Mojolicious::Command::prefork starts applications with the
57 Mojo::Server::Prefork backend.
58
59 This is a core command, that means it is always enabled and its code a
60 good example for learning to build new commands, you're welcome to fork
61 it.
62
63 See "COMMANDS" in Mojolicious::Commands for a list of commands that are
64 available by default.
65
67 Mojolicious::Command::prefork inherits all attributes from
68 Mojolicious::Command and implements the following new ones.
69
70 description
71 my $description = $prefork->description;
72 $prefork = $prefork->description('Foo');
73
74 Short description of this command, used for the command list.
75
76 usage
77 my $usage = $prefork->usage;
78 $prefork = $prefork->usage('Foo');
79
80 Usage information for this command, used for the help screen.
81
83 Mojolicious::Command::prefork inherits all methods from
84 Mojolicious::Command and implements the following new ones.
85
86 build_server
87 my $server = $daemon->build_server(@ARGV);
88
89 Build Mojo::Server::Prefork instance from command line arguments.
90
91 run
92 $prefork->run(@ARGV);
93
94 Run this command.
95
97 Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.
98
99
100
101perl v5.32.1 2021-02-07 Mojolicious::Command::prefork(3)