Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
increase timeout so continuous feed works.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson committed Apr 17, 2011
1 parent 8f12ef9 commit 41b59d1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/main/java/com/github/rnewson/couchdb/lucene/HC.java
Expand Up @@ -217,7 +217,7 @@ public HttpRequest submitRequest(final HttpContext context) {
// Stick some object into the context
context.setAttribute(REQUEST_SENT, Boolean.TRUE);
return new BasicHttpRequest("GET",
"/db1/_changes?feed=continuous&timeout=1000");
"/db1/_changes?feed=continuous&heartbeat=20000");
} else {
// No new request to submit
return null;
Expand Down Expand Up @@ -260,15 +260,14 @@ public void timeout(final SessionRequest request) {

public static void main(final String[] args) throws Exception {
final HttpParams params = new SyncBasicHttpParams();
params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 10000)
.setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE,
8 * 1024)
.setBooleanParameter(
CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
.setParameter(CoreProtocolPNames.USER_AGENT,
"HttpComponents/1.1");
params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 30000);
params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 30000);
params.setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE,
8 * 1024);
params.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,
true);
params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true);
params.setParameter(CoreProtocolPNames.USER_AGENT, "HttpComponents/1.1");

final ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(2,
params);
Expand Down

0 comments on commit 41b59d1

Please sign in to comment.