A feature of HTTP where the same connection is used for multiple requests, speeding up downloading of web pages with multiple resources.
Questions tagged [keep-alive]
892 questions
9
votes
2 answers
Why does curl send a Proxy-Connection header, even though the RFC seems to discourage it?
RFC 7230, Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing states in the appendix:
As a result, clients are encouraged not to send the Proxy-Connection header field in any requests.
Why is curl sending this header then, when…

miku
- 181,842
- 47
- 306
- 310
9
votes
1 answer
How to change Keep-Alive timeout value in SpringBoot
This is a SpringBoot website. When I debug it in Chrome, I find that there is Keep-Alive: timeout=38 in the response header.
I guess it means the max idle time a TCP connection can hold. This is from here
timeout: indicating the minimum amount of…

Robin Sun
- 1,352
- 3
- 20
- 45
9
votes
2 answers
Why isn't uWSGI respecting the "--http-keepalive" flag?
I installed uWSGI in a Docker container running ubuntu:16.04 using the following commands:
apt-get update
apt-get install -y build-essential python-dev python-pip
pip install uwsgi
I then created a single static file:
cd /root
mkdir static
dd…

Nathan Osman
- 71,149
- 71
- 256
- 361
9
votes
2 answers
How to keep http connection alive for React Native's fetch method
I am trying to use RN's fetch() method with http connection alive.
I tried with header 'Connection: keep-alive' but it does not seem to work. I cannot use http.Agent because http module is not supported in React Native. I searched but cannot find an…

Wint
- 2,268
- 2
- 22
- 32
9
votes
1 answer
How to prevent keep-alive in a HTTP 1.1 request?
I'm implementing a simple HTTP client.
Which header should I add to a HTTP 1.1 request so it won't keep alive?

Gal Hyams
- 336
- 1
- 5
- 15
9
votes
4 answers
setKeepAliveTimeout is deprecated in iOS9
The current API changes for iOS9 state that -setKeepAliveTimeout:handler: is deprecated.
Up to now, this was the only way that a VoIP SIP app on iOS could maintain its registration with the SIP-server.
This technique is used by various apps like…

chriscap
- 111
- 1
- 4
9
votes
3 answers
How to disable Keep-Alive per Directory
Is it possible to disable Keep-Alive on a directory basis?
For example, I have an API that runs on something like domain.com/api/
It'd be nice if KeepAlive was not used on any requests in the /api/ directory.
Update/Solution:
SetEnvIf Request_URI…

NNN
- 404
- 5
- 8
9
votes
5 answers
PHP, nodeJS and sessions
I have an classical apache server delivering php files, and a nodeJS server (with socket.io, but whithout express/connect) used for real-time event management on that PHP website. I sometimes need to authenticate the clients connecting to the nodeJS…

Magix
- 4,989
- 7
- 26
- 50
9
votes
1 answer
Doesnt http Keep-Alive solve the issue that long-polling solves?
What exactly is the difference between long polling and http Keep-Alive??
Doesnt http Keep-Alive solve the issue that long-polling solves??

vivek2k6
- 119
- 8
9
votes
1 answer
HTTP: what are the relations between pipelining, keep-alive and Server Sent Events?
I am trying to understand what are the HTTP pipelining and HTTP keep-alive connections, and trying to establish a connection between these two topics and Server Sent events technology.
As far as I understand,
HTTP keep-alive connection is the…

KutaBeach
- 1,445
- 21
- 43
8
votes
2 answers
Is it safe to keep session alive using ajax request?
I recently implemented a small snippet of javascript in my Master page that does an ajax request every 30 seconds to keep session alive. I know there are several questions regarding keep alive but I haven't really been able to find answers to these…

Goose
- 3,241
- 4
- 25
- 37
8
votes
2 answers
How does multithreading affect http keep-alive connection?
var (
httpClient *http.Client
)
const (
MaxIdleConnections int = 20
RequestTimeout int = 5
)
// init HTTPClient
func init() {
client := &http.Client{
Transport: &http.Transport{
MaxIdleConnsPerHost:…

JavaDeveloper
- 5,320
- 16
- 79
- 132
8
votes
4 answers
keep-alive configurations of spring-boot app
I am trying to fix/debug an issue of too many closing connection in a spring-boot web app that uses embedded tomcat. The problem arise because it closes connection that should be kept alive.
Now, I found that tomcat has configuration that limit the…

Juh_
- 14,628
- 8
- 59
- 92
8
votes
1 answer
why between nginx/nginx upstream use http/1.0?
I have 3 server:
A(nginx)-->B(nginx)-->C(nodejs),
When i access A or B,chrome use http/1.1+keepalive by default.
I do not set "proxy_http_version 1.1;" and proxy_set_header Connection "";
But between A and B,NGINX use http/1.0 by default。That is…

monkey
- 83
- 1
- 1
- 5
8
votes
2 answers
What is the use of http non persistent connection mode
It may seem to be a trivial question but still.. I have a confusion over it.
Almost at every site I have read that HTTP persistent or keep-alive connections are better than the non-persistent one.
Ques: So, why do non-persistent even exists?
Some…

user3275095
- 1,605
- 4
- 24
- 36