1START_SERVER(1)       User Contributed Perl Documentation      START_SERVER(1)
2
3
4

NAME

6       start_server - a superdaemon for hot-deploying server programs
7

SYNOPSIS

9         start_server [options] -- server-prog server-arg1 server-arg2 ...
10
11         # start Plack using Starlet listening at TCP port 8000
12         start_server --port=8000 -- plackup -s Starlet --max-workers=100 index.psgi
13

DESCRIPTION

15       This script is a frontend of Server::Starter.  For more information
16       please refer to the documentation of the module.
17

OPTIONS

19   --port=(port|host:port|port=fd|host:port=fd)
20       TCP port to listen to (if omitted, will not bind to any ports)
21
22       If host is not specified, then the program will bind to the default
23       address of IPv4 ("0.0.0.0").  Square brackets should be used to specify
24       an IPv6 address (e.g. --port=[::1]:8080)
25
26       If fd is specified, then start_server allocates the socket at the given
27       number.
28
29   --path=path
30       path at where to listen using unix socket (optional)
31
32   --dir=path
33       working directory, start_server do chdir to before exec (optional)
34
35   --interval=seconds
36       minimum interval to respawn the server program (default: 1)
37
38   --signal-on-hup=SIGNAL
39       name of the signal to be sent to the server process when start_server
40       receives a SIGHUP (default: SIGTERM). If you use this option, be sure
41       to also use "--signal-on-term" below.
42
43   --signal-on-term=SIGNAL
44       name of the signal to be sent to the server process when start_server
45       receives a SIGTERM (default: SIGTERM)
46
47   --pid-file=filename
48       if set, writes the process id of the start_server process to the file
49
50   --status-file=filename
51       if set, writes the status of the server process(es) to the file
52
53   --envdir=ENVDIR
54       directory that contains environment variables to the server processes.
55       It is intended for use with "envdir" in "daemontools".  This can be
56       overwritten by environment variable "ENVDIR".
57
58   --log-file=file
59   --log-file="| cmd args..."
60       if set, redirects STDOUT and STDERR to given file or command
61
62   --daemonize
63       deamonizes the server (by doing fork,setsid,fork).  Must be used
64       together with "--log-file".
65
66   --enable-auto-restart
67       enables automatic restart by time.  This can be overwritten by
68       environment variable "ENABLE_AUTO_RESTART".
69
70   --auto-restart-interval=seconds
71       automatic restart interval (default 360). It is used with
72       "--enable-auto-restart" option.  This can be overwritten by environment
73       variable "AUTO_RESTART_INTERVAL".
74
75   --kill-old-delay=seconds
76       time to suspend to send a signal to the old worker. The default value
77       is 5 when "--enable-auto-restart" is set, 0 otherwise.  This can be
78       overwritten by environment variable "KILL_OLD_DELAY".
79
80   --backlog=size
81       specifies a listen backlog parameter, whose default is SOMAXCONN
82       (usually 128 on Linux). While SOMAXCONN is enough for most loads, large
83       backlog is required for heavy loads.
84
85   --restart
86       this is a wrapper command that reads the pid of the start_server
87       process from --pid-file, sends SIGHUP to the process and waits until
88       the server(s) of the older generation(s) die by monitoring the contents
89       of the --status-file
90
91   --stop
92       this is a wrapper command that reads the pid of the start_server
93       process from --pid-file, sends SIGTERM to the process.
94
95   --help
96       prints this help
97
98   --version
99       prints the version number
100

AUTHOR

102       Kazuho Oku
103

SEE ALSO

105       Server::Starter
106

LICENSE

108       This library is free software; you can redistribute it and/or modify it
109       under the same terms as Perl itself.
110
111
112
113perl v5.28.1                      2019-02-02                   START_SERVER(1)
Impressum