Questions tagged [keepalive]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
4k views

Tuning Apache KeepAlive Timeout for HTTPS

My website forces HTTPS everywhere and has an average first load time of 3-5 seconds. Thanks to caching, repeat load time is 0.8 seconds. The SSL negotiation takes 150-300ms on my server, so I want ...
PF Billing's user avatar
23 votes
3 answers
54k views

nginx connection timeout & client closed connection issue

I have this nginx server running on AWS & it was working all fine until recently when couple of users started complaining about the website not opening until they made some 10 attempts to access ...
Nitish Dhar's user avatar
3 votes
1 answer
10k views

option http-server-close on HAProxy haproxy-1.5-dev19 will result in Connection: close header sent in response

I basically have the following issue: whenever I add option http-server-close to the haproxy config (either in frontend or backend section), haproxy will send a Connection: close header in the ...
Bogdan Sorlea's user avatar
0 votes
3 answers
3k views

Which settings schould be changed to lower apache CPU usage and use more RAM?

On our CentOS 6 server, we have now a lot of CPU overload, while our RAM is almost not used. KeepAlive is set to "on" because we have some AJAX elements on your website and serving many files such as ...
lickmycode's user avatar
5 votes
2 answers
4k views

Apache: Force HTTP 1.1 or Persistent/KeepAlive connections for HTTP 1.0 requests

I want to force Keep Alive or Persistent connections for all HTTP requests on my Apache 2.2.3 server running on RHEL 5.8. A lot of web crawlers are using HTTP 1.0 for some reason, and I would like to ...
usedTobeaMember's user avatar
1 vote
0 answers
620 views

tcpdump expression to show zero-byte ACKs?

I want to show zero-byte TCP keepalives sent and received. While this could be generally useful, in this particular case I want to prove that a change I made to the JDBC driver (adding tcpKeepAlive=...
Steve Kehlet's user avatar
  • 1,105
15 votes
1 answer
34k views

Should `keepalive_timeout` be removed from Nginx config?

Which is the better configuration/optimization: to explicitly limit the keepalive_timeout or to allow Nginx to kill keepalive connections on its own? I have seen two conflicting recommendations ...
Bryson's user avatar
  • 263
0 votes
2 answers
4k views

Http Persistent Connection (keep-alive) and port numbers

Is a persistent http connection (keep-alive), always bound to a specific port, or can it use a range of ports?
Daniele B's user avatar
  • 367
1 vote
1 answer
1k views

How do I know that my TCP connection is safe from the Firewalls/NAT?

Being on the Azure cloud, I found that the firewalls there drop connections between the Web server and the database quite often. Mostly when there was some inactivity, I think something between 5 and ...
Philip's user avatar
  • 203
1 vote
1 answer
5k views

How do I change my ubuntu keepalive to infinity?

http://www.golinuxhub.com/2013/03/setting-up-custom-tcpip-keep-alive.html Once I connect to my development server, I don't want it to automatically disconnect unless I quit my terminal. What ...
Alex's user avatar
  • 8,591
0 votes
0 answers
748 views

Scriptable FTPS client able to send Keep Alive to control port?

We need a FTP client that satisfies the following constraints: Windows Command-line scriptable, so we can automate it...sorry, FileZilla (?) FTPS, as it seems to perform better than SFTP The ability ...
iokevins's user avatar
  • 274
4 votes
2 answers
6k views

Large keepalive_requests values are severely slowing-down Nginx

When running a bacon (43-byte transparent pixel) load test on Nginx, we have tried several keepalive_requests values (from 10 to 100,000) and the optimal value seems to be 10. Here are the server ...
Gil's user avatar
  • 307
1 vote
1 answer
2k views

Do keepalives to socket connections exist?

Pre briefing: Although my question is broad on purpose, I am dealing with nginx connecting to php-fpm (fcgi), which is served via a local socket (/tmp/somesocket.socket). Nginx has a setting to ...
anonymous-one's user avatar
0 votes
1 answer
1k views

Making Dovecot keep its TCP connections alive?

I'm trying to run a benchmarking application which connects to my IMAP server and has a "warm up" phase during which IMAP connections are being established. I've set my limits properly and the mail ...
user991710's user avatar
4 votes
2 answers
3k views

Trying to understand how keep-alive works

Today we encountered a problem on the server, when files/scripts took more that 3 seconds to load. The solution was simple - just increasing MaxClients to the estimated memory limit. But I am worried ...
user1065145's user avatar
1 vote
1 answer
1k views

Is tcp_keepalive application dependant on Linux?

According to http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/index.html , the kernel keepalive function occurs at the OS level, and doesn't require an application to explicitly call it. However I also read ...
Davis's user avatar
  • 13
2 votes
1 answer
3k views

HTTP Keep-Alive puzzle with EC2 Linux, Nginx and Chrome

Please, help to solve HTTP keep-alive problem. Basically, I have amazon-ami linux (v2012.09) on EC2 running nginx (v1.2.6). Chrome (v25.0.1364.99) accesses HTTP page normally, then after about 30 ...
Ievgen Lukash's user avatar
1 vote
2 answers
6k views

In Nginx can I set Keep-Alive dynamically depending on ssl connection?

I would like to avoid having to repeat all the virtualhost server {} blocks in nginx just to have custom ssl settings that vary slightly from plain http requests. Most ssl directives can be placed ...
ck_'s user avatar
  • 469
1 vote
2 answers
2k views

Spawning HTTPD processes

Can any confirm how Apache spawns new children ? As in if I connect to a webserver (HTTP 1.0 / no keep alive) and issue a HTTP /GET I will be spawned a new HTTPD child. If then issue another HTTP /...
RickD's user avatar
  • 155
3 votes
3 answers
4k views

Proxy to keep connection to API alive

On one server I have some 30 PHP sites running under Apache. All those sites use the same (HTTP) API to fetch some data. The API is hosted elsewhere (under my control) The API uses Nginx with keep-...
Ivor's user avatar
  • 31
0 votes
1 answer
8k views

NGINX : Keep alive requests to static content ok - Keep alive requests to php-fpm requests hang until keepalive_timeout is reached

FYI, the initial question I have posted is here, no need to read it as I was way off initially: https://serverfault.com/questions/427296/nginx-php-fpm-strange-issue-when-trying-to-display-images-via-...
anonymous-one's user avatar
4 votes
1 answer
7k views

Nginx keepalive_requests - What value to use for unlimited?

We are using an nginx backend behind a nginx proxy. We use upstream keepalives. They work quite nicely. We were wondering, what value would we set keepalive_requests on the backend to set the ...
anonymous-one's user avatar
3 votes
3 answers
5k views

mod_rewrite+proxy closes connections to backend (keepalive)

We have a fairly typical setup: client <-> apache2 (2.2.22) <-> backend (*). Initially we were using mod_rewrite with the [P] flag in the simplest form: <VirtualHost *:80> ...
adamw's user avatar
  • 145
11 votes
1 answer
35k views

TCP Keepalive and firewall killing idle sessions

In a customer site, the network team added a firewall between the client and the server. This is causing idle connections to get disconnected after about 40 minutes of idle time. The network people ...
Carlos A. Ibarra's user avatar
2 votes
1 answer
2k views

Does apaches keep alive time-out reset every time a request is received?

The title of this question is pretty self explanatory, but: Does apaches keep alive timeout reset (as in, start again) every time a request is received? So for example, assume we have a 60 second ...
anonymous-one's user avatar
22 votes
11 answers
25k views

keep ssh connection alive and persistant while switching network interface connections

Scenario: At my desk with laptop plugged in to ethernet and connected to remote server over SSH Want to move to other side of office with laptop and change to WiFi without interrupting SSH ...
Sean's user avatar
  • 383
1 vote
1 answer
3k views

Is it possible to use local web.config to enable keep-alive?

Is there any way to enable keep-alive on IIS 7 in a hosted scenario? I attempted to use the answer to this SO question Where (or how) is the keep-alive setting in web.config?. I added the following ...
escist's user avatar
  • 123
6 votes
7 answers
9k views

How can I avoid heroku stopping my dyno?

I build MVP's for clients regularly. Often I deploy on Heroku so they can see if the product works and demo it to prospects and investors. Then I have an application deployed on heroku, and it works ...
iwein's user avatar
  • 191
0 votes
2 answers
3k views

keepAlive in Apache causing apache to reach its max_clients

I have an Apache 2.2 running on ubuntu 11.4 with 16Gb RAM, for image hosting from mobile phones through GPRS,since connection is slow i have enabled keepalive and set time out to 6,**based on average ...
ananthan's user avatar
  • 1,520
1 vote
1 answer
2k views

netstat reports ESTABLISHED connection even after I've pulled the cord

I'm experimenting with lost connections between my java application and my mysql server. The application and the server are on two different machines and I'm pulling the physical cord between the ...
Andreas Wederbrand's user avatar
0 votes
1 answer
443 views

Keep alive and Max_client issue in Apache

I have installed Apache/2.2.17 on ubuntu 11.4(64bit) ,with 48 GB of RAM, and set KeepAlive ON MaxKeepAliveRequests 100 keepalivetimeout to 6 (since lot of dynamic images) StartServers 100 ...
ananthan's user avatar
  • 1,520
1 vote
1 answer
6k views

Is it better to disable Keep-Alive in IIS 7 for high traffic web applications?

The advice below applies to Apache, but it seems generic enough to apply regardless of system. My architecture is 3 web servers behind a load balancer. My IIS servers currently have keep-alive enabled ...
dan's user avatar
  • 426
0 votes
2 answers
944 views

Keep-alives are not working for websites with NodeBalancer in Linode

I have following configuration in my linode slice NB <----->web1+web2+web3 Here's the configuration screenshot from linode: We need NB in http mode since we need few things that plain tcp mode ...
kaji's user avatar
  • 2,548
21 votes
2 answers
33k views

What is the difference between keepalive and heartbeat?

I want to structure a high available server cluster . Now I want to know detail about keepalive and heartbeat, what is the difference between both, and How to choice one.
aboutstudy's user avatar
2 votes
0 answers
597 views

A tool to measure overhead of establishing TCP connections

I need a tool which would while doing port forwarding measure how much time was spent establishing TCP connections vs total time passed. Charles debugging proxy has the port forwarding feature and ...
axk's user avatar
  • 267
3 votes
2 answers
2k views

Is It Better to set KeepAlive to 1 second rather than turning it off all together?

I've heard setting keepalive timeout at too high a number will diminish its value. So, to be on the safe side, and still somewhat benefit from it, can I set it to 1 second ? Or will setting it to 1 ...
Greatestswordsman's user avatar
0 votes
2 answers
588 views

Keeping connections open

I'm new to cURL and I'm trying to do something reasonably simple. I want to login to a server and download data at regular intervals over a few hours. First, I login to the server - which I've ...
Gary's user avatar
  • 3
1 vote
3 answers
123 views

Can I get a router to call a url on a timer?

I am responsible for a small network spread over several buildings. We have accommodation areas that have a router providing access to the internet to guests. I would love to be able to get the ...
Toby Allen's user avatar
2 votes
1 answer
36k views

How to find the connection time-out value in linux?

I am setting up a nginx webserver with php-fpm and (d)dos deflate to ban attacks. Now currently there is no traffic to my server at all, as i'm testing things. With this command i can see who is ...
Mr.Boon's user avatar
  • 1,481
2 votes
1 answer
2k views

Keeping a Python Script alive after leaving SSH Client?

I have a while loop in my Python Script and its independent script so I can't run it as a daemon. Also I have tryed using nohup, but I'm having this error: root@ubuntu:~/Desktop/starthere-group-ok# ...
MrCskncn's user avatar
8 votes
2 answers
21k views

Keep-alive options not working on Linux for an outgoing connection

Does anyone know if Linux supports keep-alive socket options on an outgoing connection? I made an outgoing connection with keep-alive options but netstat --timers shows off (I'm assuming timers are ...
James Hartig's user avatar
13 votes
1 answer
51k views

How to adjust nginx keepalive_timeout?

I am using nginx along with php-fpm to server a busy mysql-based site. Currently I am using keepalive_timeout = 5, however I have no clear idea about how to optimally adjust it. So appreciate your ...
alfish's user avatar
  • 3,157
9 votes
2 answers
22k views

Impact of Connection Close vs Keep-alive

I'm configuring our servers, and due to the nature of our load balancer, we can't send connection keep-alive headers. I'm trying to determine the impact of sending these headers to both the end-user ...
Willemk's user avatar
  • 117
7 votes
2 answers
8k views

keep-alive or not keep-alive

My company is launching a new website with potentially large waves of visitors in very short windows (estimate is around 14k visitors in a 2 minutes window). So, I'm reviewing our configuration, and ...
Julien Vehent's user avatar
24 votes
2 answers
48k views

How to test keep-alive is working on client end

What are some different ways/tools to verify that keep-alive is working on the server from the client's end?
Ron Garrity's user avatar
0 votes
1 answer
809 views

Apache Timeout/KeepAlive

I run several apache web servers on CentOS 5.x and they all seem to have the same problem. It is typically fast but at times the browser will just sit there waiting forever and it never fails or goes ...
memoryisram's user avatar
2 votes
1 answer
1k views

HP switch 'mirror port' makes a Cisco switch port err-disabled due to keepalive loop-back

I'm trying to connect an HP ProCurve 5304xl switch to a Cisco 2950. The HP port I'm connecting to is described as a 'mirror port', which appears to be like a SPAN port except that it also allows ...
Matt Bennett's user avatar
4 votes
1 answer
10k views

Keep-Alive and Timeout Behaviours between different browsers on Windows

Short Version Why does chrome send out keep-alive's while IE and FF don't? Long Version Initially, I thought this was a server-side issue. I've got an apache server that's a frontend proxy for a ...
Dan R's user avatar
  • 255
0 votes
1 answer
3k views

Is this normal? Multiple httpd process

I'm testing a new Server. This isnt really a peak time for my server (2pm), but still its running a bit slow, I was checking the ESTABLISHED connections using the following command: # netstat -ntu | ...
ilcreatore's user avatar
0 votes
1 answer
1k views

how do i turn on the Keep Alive and HTTP Compression in Apache server 2.2( centos)

how do I turn on the KeepAlive and HTTP Compression in Apache server 2.2(centos)
gourav's user avatar
  • 1