Questions tagged [persistent-connection]

HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair. The newer HTTP/2 protocol uses the same idea and takes it further to allow multiple concurrent requests/responses to be multiplexed over a single connection.

153 questions
0
votes
2 answers

What is the best way to extend HTTParty RestClient for specific API calls with persistent_http?

We currently use HTTParty gem for our RestClient class in our Rails Engine. Recently, we leveraged the persistent_httparty wrapper to add the ability to set read timeouts and open timeouts. This allows us to then implement our own custom handling…
SpartaSixZero
  • 2,183
  • 5
  • 27
  • 46
0
votes
1 answer

Why SpringBoot RabbitMQ client auto shutdown connection to rabbitmq server

** geting rabbitmq connection error as follows. ** 2019-07-11 13:14:51.147.AMQP Connection 127.0.0.1:5672> ERROR - TID[] UID[] MID[] CID[] - Channel shutdown: connection error; protocol method: #method(reply-code=541, reply-text=INTERNAL_ERROR,…
0
votes
1 answer

How django ensure one persistent connection doesn't shared by multithread at the same time?

From django db doc , when use persistent connection(set CONN_MAX_AGE > 0 or None), it won't be closed after each request util it exceeds the maximum age or when it isn’t usable any longer. That's being said, the following reuqests will use the same…
Dick Smith
  • 11
  • 4
0
votes
2 answers

Send data to servlet after several time interval

I want to create a Servlet, To which I can send data (GET/POST doesn't matter) after some time interval. It will be something like persistent connection from Client to server. Using this single connection I will be sending some data (String) to the…
Abdul Mohsin
  • 1,253
  • 1
  • 13
  • 24
0
votes
1 answer

Web page waiting indefinitely for web server to respond

I am writing a simple web server in Java with the help of ServerSocket and Socket APIs provided by JDK. I have a WebServer class(a 'Thread') which has a ServerSocket serverSocket = new ServerSocket(8086); and blocks on Socket clientSocket =…
Harsh Chiki
  • 79
  • 1
  • 10
0
votes
1 answer

iOS - Keep web-socket connection to local network device always alive

I have a device, located in a Wi-Fi local network possibly without Internet connection, which sends notifications to the devices that are connected to it using a web-socket. But when I lock the phone or press the home button, my application goes to…
Iván Pérez
  • 2,278
  • 1
  • 24
  • 49
0
votes
1 answer

PHP and persistent connections

Whenever I open a persistent connection to the DB , if the DB daemon crashes and is then restarted, 30% of new connections to the daemon will result in a broken pipe error. This is fixable by changing the persistent connection handle, but it needs…
Kristina
  • 15,859
  • 29
  • 111
  • 181
0
votes
1 answer

Persistent HTTP-connection from Android to Node.js server

I'm trying to implement a little communication scheme handling HTTP-requests from an Android device to a Node.js server. With the current code the Android side closes the connection after receiving the response from the header. Java: public String…
qantik
  • 1,067
  • 1
  • 10
  • 20
0
votes
1 answer

Optimal delivery method for a large quantity of images

I have a website centered around an online chat application where each user can have up to several hundred contacts. Each contact has there own profile image. I want to make it so that the contact's profile image is loaded next to there name.…
user396404
  • 2,759
  • 7
  • 31
  • 42
0
votes
1 answer

JBoss preventing keep-alive when no more thread available

After experimenting with my JBoss 5.1 server I noticed that the HTTP responses contain the Connection: close header if the current thread is the last available one. For instance if I set maxThreads="4" in the HTTP connector config and perform more…
sdabet
  • 18,360
  • 11
  • 89
  • 158
0
votes
1 answer

Is it safe to use persistent connection using PHP mysqli interface?

There are quite a few blog/links which discourage usage of persistent connections, mainly because the cleanup needs to be done on client side, and cases where transactions/locks have to be correctly rolled back. However, those links are old, and not…
Ouroboros
  • 1,432
  • 1
  • 19
  • 41
0
votes
1 answer

Using persistent and non-persistent connection together in a PHP MySQL app

There are parts of my app where a persistent connection is required, in particular the parts where every hour maybe 30,000 select requests are made by many different users, this is causing my mysql server to max out on the 100 connection limit, and…
cappuccino
  • 2,175
  • 5
  • 26
  • 48
0
votes
0 answers

azure start page signalR

I have created a simple SignalR web site (copied from a book). I have declared the index.html page as startup page. When I run it from within Visual Stufio (using IIS Express) it works fine. When I publish to Azure the index.html page is just…
user3553401
  • 109
  • 2
  • 15
0
votes
1 answer

Making a login session cookie id not theftable by regenerating itself repeatedly

To counteract login session cookie theft, sniffing etc i've been thinking about this scheme. i already read http://jaspan.com/improved_persistent_login_cookie_best_practice and what i wish to do is something less-complicated, maybe performance-wise…
le me
  • 1
  • 3
0
votes
2 answers

No persistent user connection with django between 5 websites stored in the same server

I have 5 django website on my server. The problem is that I can't be logged-in in every website at the same time, when I login in website A and I click on another site B : I lose connection on A. I can only be logged with 1 site at a time. 4 sites…
Alex
  • 487
  • 1
  • 6
  • 16