xref: /curl/docs/cmdline-opts/keepalive-time.md (revision e7219c2b)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: keepalive-time
5Arg: <seconds>
6Help: Interval time for keepalive probes
7Added: 7.18.0
8Category: connection
9Multi: single
10See-also:
11  - no-keepalive
12  - max-time
13Example:
14  - --keepalive-time 20 $URL
15---
16
17# `--keepalive-time`
18
19Set the time a connection needs to remain idle before sending keepalive probes
20and the time between individual keepalive probes. It is currently effective on
21operating systems offering the `TCP_KEEPIDLE` and `TCP_KEEPINTVL` socket
22options (meaning Linux, recent AIX, HP-UX and more). Keepalive is used by the
23TCP stack to detect broken networks on idle connections. The number of missed
24keepalive probes before declaring the connection down is OS dependent and is
25commonly 9 or 10. This option has no effect if --no-keepalive is used.
26
27If unspecified, the option defaults to 60 seconds.
28