4 <meta http-equiv='content-type' content='text/html;charset=utf8'
>
5 <meta name='generator' content='Ronn-NG/v0.8
.2 (http://github.com/apjanke/ronn-ng/tree/
0.8.2)'
>
6 <title>beanstalkd(
1) - simple, fast work queue
</title>
7 <style type='text/css' media='all'
>
9 body#manpage {margin:
0}
10 .mp {max-width:
100ex;padding:
0 9ex
1ex
4ex}
11 .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:
0 0 20px
0}
12 .mp h2 {margin:
10px
0 0 0}
13 .mp
> p,.mp
> pre,.mp
> ul,.mp
> ol,.mp
> dl {margin-left:
8ex}
14 .mp h3 {margin:
0 0 0 4ex}
15 .mp dt {margin:
0;clear:left}
16 .mp dt.flush {float:left;width:
8ex}
17 .mp dd {margin:
0 0 0 9ex}
18 .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
19 .mp pre {margin-bottom:
20px}
20 .mp pre+h2,.mp pre+h3 {margin-top:
22px}
21 .mp h2+pre,.mp h3+pre {margin-top:
5px}
22 .mp img {display:block;margin:auto}
23 .mp h1.man-title {display:none}
24 .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:
14px;line-height:
1.42857142857143}
25 .mp h2 {font-size:
16px;line-height:
1.25}
26 .mp h1 {font-size:
20px;line-height:
2}
27 .mp {text-align:justify;background:#fff}
28 .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#
131211}
29 .mp h1,.mp h2,.mp h3,.mp h4 {color:#
030201}
30 .mp u {text-decoration:underline}
31 .mp code,.mp strong,.mp b {font-weight:bold;color:#
131211}
32 .mp em,.mp var {font-style:italic;color:#
232221;text-decoration:none}
33 .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#
0000ff}
34 .mp b.man-ref {font-weight:normal;color:#
434241}
35 .mp pre {padding:
0 4ex}
36 .mp pre code {font-weight:normal;color:#
434241}
37 .mp h2+pre,h3+pre {padding-left:
0}
38 ol.man-decor,ol.man-decor li {margin:
3px
0 10px
0;padding:
0;float:left;width:
33%;list-style-type:none;text-transform:uppercase;color:#
999;letter-spacing:
1px}
39 ol.man-decor {width:
100%}
40 ol.man-decor li.tl {text-align:left}
41 ol.man-decor li.tc {text-align:center;letter-spacing:
4px}
42 ol.man-decor li.tr {text-align:right;float:right}
46 The following styles are deprecated and will be removed at some point:
47 div#man, div#man ol.man, div#man ol.head, div#man ol.man.
49 The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
50 .man-navigation should be used instead.
53 <div class='mp' id='man'
>
55 <div class='man-navigation' style='display:none'
>
56 <a href=
"#NAME">NAME
</a>
57 <a href=
"#SYNOPSIS">SYNOPSIS
</a>
58 <a href=
"#DESCRIPTION">DESCRIPTION
</a>
59 <a href=
"#OPTIONS">OPTIONS
</a>
60 <a href=
"#ENVIRONMENT">ENVIRONMENT
</a>
61 <a href=
"#SEE-ALSO">SEE ALSO
</a>
62 <a href=
"#AUTHOR">AUTHOR
</a>
65 <ol class='man-decor man-head man head'
>
66 <li class='tl'
>beanstalkd(
1)
</li>
68 <li class='tr'
>beanstalkd(
1)
</li>
73 <h2 id=
"NAME">NAME
</h2>
75 <code>beanstalkd
</code> -
<span class=
"man-whatis">simple, fast work queue
</span>
77 <h2 id=
"SYNOPSIS">SYNOPSIS
</h2>
79 <p><code>beanstalkd
</code> [
<var>options
</var>]
</p>
81 <h2 id=
"DESCRIPTION">DESCRIPTION
</h2>
83 <p><code>Beanstalkd
</code> is a simple work-queue service. Its interface is
84 generic, though it was originally designed for reducing the latency of
85 page views in high-volume web applications by running time-consuming
86 tasks asynchronously.
</p>
88 <p>When started,
<code>beanstalkd
</code> opens a socket (or uses a file descriptor
89 provided by the
<span class=
"man-ref">init
<span class=
"s">(
1)
</span></span> system, see
<a href=
"#ENVIRONMENT" title=
"ENVIRONMENT" data-bare-link=
"true">ENVIRONMENT
</a>) and listens for
90 incoming connections. For each connection, it reads a sequence of
91 commands to create, reserve, delete, and otherwise manipulate
"jobs",
92 units of work to be done. See file
<code>doc/protocol.txt
</code> in the
93 <code>beanstalkd
</code> distribution for a thorough description of the meaning
94 and format of the
<code>beanstalkd
</code> protocol.
</p>
96 <h2 id=
"OPTIONS">OPTIONS
</h2>
100 <code>-b
</code> <var>path
</var>
102 <dd>Use a binlog to keep jobs on persistent storage in directory
<var>path
</var>.
103 Upon startup,
<code>beanstalkd
</code> will recover any binlog that is present
104 in
<var>path
</var>, then, during normal operation, append new jobs and
105 changes in state to the binlog.
</dd>
107 <code>-f
</code> <var>ms
</var>
109 <dd>Call
<span class=
"man-ref">fsync
<span class=
"s">(
2)
</span></span> at most once every
<var>ms
</var> milliseconds. Larger values
110 for
<var>ms
</var> reduce disk activity and improve speed at the cost of
111 safety. A power failure could result in the loss of up to
<var>ms
</var>
112 milliseconds of history.
114 <p>A
<var>ms
</var> value of
0 will cause
<code>beanstalkd
</code> to call fsync every time
115 it writes to the binlog.
</p>
117 <p>The default behavior is to sync every
50 ms.
</p>
119 <p>(This option has no effect without
<code>-b
</code>.)
</p>
121 <dt><code>-F
</code></dt>
122 <dd>Never call
<span class=
"man-ref">fsync
<span class=
"s">(
2)
</span></span>. Equivalent to
<code>-f
</code> with an infinite
<var>ms
</var> value.
124 <p>(This option has no effect without
<code>-b
</code>.)
</p>
126 <dt><code>-h
</code></dt>
127 <dd>Show a brief help message and exit.
</dd>
129 <code>-l
</code> <var>addr
</var>
131 <dd>Listen on address
<var>addr
</var> (default is
0.0.0.0).
133 <p>When
<var>addr
</var> starts with
"unix:", the unprefixed value of it will be
134 used as the local filesystem path to create a UNIX socket instead of
135 a TCP socket. In this case the value of
<code>-p
</code> will be ignored.
</p>
137 <p>(Option
<code>-l
</code> has no effect if
<span class=
"man-ref">sd-daemon
<span class=
"s">(
5)
</span></span> socket activation is
138 being used. See also
<a href=
"#ENVIRONMENT" title=
"ENVIRONMENT" data-bare-link=
"true">ENVIRONMENT
</a>.)
</p>
141 <code>-p
</code> <var>port
</var>
143 <dd>Listen on TCP port
<var>port
</var> (default is
11300).
145 <p>(Option
<code>-p
</code> has no effect if
<span class=
"man-ref">sd-daemon
<span class=
"s">(
5)
</span></span> socket activation is
146 being used. See also
<a href=
"#ENVIRONMENT" title=
"ENVIRONMENT" data-bare-link=
"true">ENVIRONMENT
</a>.)
</p>
149 <code>-s
</code> <var>bytes
</var>
151 <dd>The size in bytes of each binlog file.
153 <p>(This option has no effect without
<code>-b
</code>.)
</p>
156 <code>-u
</code> <var>user
</var>
158 <dd>Become the user
<var>user
</var> and its primary group.
</dd>
159 <dt><code>-V
</code></dt>
160 <dd>Increase verbosity. May be used more than once to produce more
161 verbose output. The output format is subject to change.
</dd>
162 <dt><code>-v
</code></dt>
163 <dd>Print the version string and exit.
</dd>
165 <code>-z
</code> <var>bytes
</var>
167 <dd>The maximum size in bytes of a job.
</dd>
168 <dt><code>-c
</code></dt>
169 <dd>This flag has no effect. It is kept for historical compatibility only.
</dd>
170 <dt><code>-n
</code></dt>
171 <dd>This flag has no effect. It is kept for historical compatibility only.
</dd>
175 <h2 id=
"ENVIRONMENT">ENVIRONMENT
</h2>
179 <code>LISTEN_PID
</code>,
<code>LISTEN_FDS
</code>
181 <dd>These variables can be set by
<span class=
"man-ref">init
<span class=
"s">(
1)
</span></span>. See
<span class=
"man-ref">sd_listen_fds
<span class=
"s">(
3)
</span></span> for
186 <h2 id=
"SEE-ALSO">SEE ALSO
</h2>
188 <p><span class=
"man-ref">sd-daemon
<span class=
"s">(
3)
</span></span>,
<span class=
"man-ref">sd_listen_fds
<span class=
"s">(
3)
</span></span></p>
190 <p>Files
<code>README.md
</code> and
<code>doc/protocol.txt
</code> in the
<code>beanstalkd
</code>
193 <p><a href=
"https://beanstalkd.github.io/" data-bare-link=
"true">https://beanstalkd.github.io/
</a></p>
195 <h2 id=
"AUTHOR">AUTHOR
</h2>
197 <p><code>Beanstalkd
</code> is written by Keith Rarick and maintained by the community at
198 <a href=
"https://github.com/beanstalkd/beanstalkd/issues" data-bare-link=
"true">https://github.com/beanstalkd/beanstalkd/issues
</a></p>
200 <ol class='man-decor man-foot man foot'
>
202 <li class='tc'
>June
2020</li>
203 <li class='tr'
>beanstalkd(
1)
</li>