keep-alive

How to avoid client firewall closing connection because inactivity while processing data on Grails

痴心易碎 提交于 2019-12-08 04:04:00
问题 I have one Grails working on the server on Tomcat. This app is an web interface to export information from the MySQL server. This information can be exported depending on the selection that you did, but takes some time. The biggest part or process is around 40min. This is the time that it needs to export all the information from the database and return to user compressed in one zip file. Everything is working correctly but we have a problem with one client. They have some kind of proxy

chrome - don´t wait until all data is received - node.js

僤鯓⒐⒋嵵緔 提交于 2019-12-07 22:04:33
问题 I´m experimenting with node.js and the possibility to keep a http connection open, to send new data later. Just like a one-way socket. I have the following node.js http server: var http = require("http"); var s = http.createServer(function(req,res){ var i = 0; res.writeHead(200,{'content-type': 'text/plain'}); var iv = setInterval(function(){ res.write((i++)+""); if(i == 50){ clearInterval(iv); res.end(""); } },1000); }); s.listen(8000); When I make a request to this server in firefox, I get

Keep-Alive socket with HTTP server under C# (.net) how to send several queries?

喜你入骨 提交于 2019-12-07 18:41:49
问题 Noob question. So i try this code to call http server for resource many times on same socket: public void TryReuseSameSocket(){ var addr = Dns.GetHostAddresses("stackoverflow.com"); var socket = new Socket(SocketType.Stream, ProtocolType.Tcp); try { // i thought that i must to use this option socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, 1); socket.Connect(addr, 80); var bigbuff = new byte[10000]; for (var i = 0; i < 20; i++) { //now i try to call some URL many

How to stay alive in HTTP/1.1 using python urllib

陌路散爱 提交于 2019-12-07 11:17:40
问题 For now I am doing this: (Python3, urllib) url = 'someurl' headers = '(('HOST', 'somehost'), / ('Connection', 'keep-alive'),/ ('Accept-Encoding' , 'gzip,deflate')) opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor()) for h in headers: opener.addheaders.append(x) data = 'some logging data' #username, pw etc. opener.open('somesite/login.php, data) res = opener.open(someurl) data = res.read() ... some stuff here... res1 = opener.open(someurl2) data = res1.read() etc. What

Site incredibly slow for firefox, instant on every other browser: KeepAlive issue?

﹥>﹥吖頭↗ 提交于 2019-12-07 03:58:32
I have a site where a page takes 10 seconds to load with firefox, and a further 10 seconds to load the images. It's a php page running on apache. The Images are just static images. It runs beautifully on chrome.... instant loading. googling for the answer has pointed me towards a possible issue with keep alive and the lack of content length confusing firefox, and indeed, it appears that content length isn't being set by the server on either the static or non static content, but disabling keep alive on the server doubles the load time! Some sites have suggested disabling keep alive on the

Android - VPN at the native layer

若如初见. 提交于 2019-12-07 03:07:51
问题 Just a quick question as Google isn't throwing up much. Is it possible to create a VPN connection using native code in Android? And if so does the VPN offer support for keep alives? 回答1: I believe it would be more of a permissions issue than of an exposed or not exposed issue. Most VPN connections would need you to modify and access the network filtering calls of your kernel. Since your app should really be operating in it's own sandbox this is something I would doubt is exposed by default

How do I prevent my .NET SOAP client from including “Connection: KeepAlive” in the HTTP headers. (using WSE3.0)

耗尽温柔 提交于 2019-12-07 01:33:11
问题 In the HTTP Connection header, my web service client is including: Connection: Keep-Alive I want to disable this. After doing some research, it appears the way to do this is to set the KeepAlive member of the SoapHttpChannelOptions class to false. But, I do not see a way to access/modify SoapHttpChannelOptions in the webservice client class that was generated for me in Visual Studio using WSE3.0 (Web Service Enhancement. In my case, the generated stub class extends Microsoft.Web.Services3

How to break connections TCP/IP by keepalive postgreSQL without changing anything in the register?

可紊 提交于 2019-12-06 15:59:47
问题 I have a system working with the client-server structure and PostgreSQL 8.4. My problem is that if a client is editing a record and lose his connection to the server, the TCPIP connection is still considered! So, the record stay allocated for the client in my database. I need the records to be free for edit in a few minutes. Therefore I set the KEEPALIVE configuration in my "postgresql.conf": tcp_keepalives_idle = 60 # TCP_KEEPIDLE, in seconds; tcp_keepalives_interval = 60 # TCP_KEEPINTVL, in

spring RestTemplate 出现 NoHttpResponseException 和 ConnectionTimeoutException

怎甘沉沦 提交于 2019-12-06 15:07:18
使用 httpclient.4.5.6 springboot 2.0.8RELEASE RetryExec.java CloseableHttpResponse execute() try { return this.requestExecutor.execute(route, request, context, execAware); } catch(final IOException ex) { if (retryHandler.retryRequest(ex.execCount, context) { } else { if (ex instanceof NoHttpResponseException) { } } } @Configuration public class RestTemplateConfig { // builder.build();的并发量是5,不如 new RestTemplate() 默认200 @Bean public RestTemplate restTemplate(RestTemplateBuilder builder) { return builder.build(); } } 这样建的RestTemplate 没有重发 NoHttpResponseException和org.apache.http.conn

chrome - don´t wait until all data is received - node.js

女生的网名这么多〃 提交于 2019-12-06 13:27:02
I´m experimenting with node.js and the possibility to keep a http connection open, to send new data later. Just like a one-way socket. I have the following node.js http server: var http = require("http"); var s = http.createServer(function(req,res){ var i = 0; res.writeHead(200,{'content-type': 'text/plain'}); var iv = setInterval(function(){ res.write((i++)+""); if(i == 50){ clearInterval(iv); res.end(""); } },1000); }); s.listen(8000); When I make a request to this server in firefox, I get every second a new number, until number 50 is reached. In chrome, it waits 50 seconds and then it gives