From: Magnus Hagander Date: Sat, 12 Jan 2013 17:11:38 +0000 (+0100) Subject: Attempt to set a 20 second timeout on searches X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=15ca8bfb380f5b01f8d1ab2f22c46a3f61397247;p=pgweb.git Attempt to set a 20 second timeout on searches --- diff --git a/pgweb/search/views.py b/pgweb/search/views.py index 30d7aa86..45c5efa7 100644 --- a/pgweb/search/views.py +++ b/pgweb/search/views.py @@ -178,6 +178,7 @@ def search(request): # No hits found - so try to get them from the search server c = httplib.HTTPConnection(settings.ARCHIVES_SEARCH_SERVER, strict=True, timeout=5) c.request('POST', '/archives-search/', urlstr) + c.sock.settimeout(20) # Set a 20 second timeout r = c.getresponse() if r.status != 200: memc = None