From: Mark Huang Date: Mon, 12 Feb 2007 18:42:49 +0000 (+0000) Subject: Shut down database connection, otherwise up to MaxClients DB X-Git-Tag: PLCAPI-4.2-0~188 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c6790746d7dc883fda2ba6b386d23f06f3032ebd;p=plcapi.git Shut down database connection, otherwise up to MaxClients DB connections will remain open. --- diff --git a/ModPython.py b/ModPython.py index 55dfdcad..a6a424c5 100644 --- a/ModPython.py +++ b/ModPython.py @@ -5,7 +5,7 @@ # Mark Huang # # Copyright (C) 2004-2006 The Trustees of Princeton University -# $Id: ModPython.py,v 1.3 2006/10/30 16:39:24 mlhuang Exp $ +# $Id: ModPython.py,v 1.4 2007/01/11 22:05:15 mlhuang Exp $ # import sys @@ -45,6 +45,10 @@ def handler(req): # Handle request response = api.handle(remote_addr, request) + # Shut down database connection, otherwise up to MaxClients DB + # connections will remain open. + api.db.close() + # Write response req.content_type = "text/xml; charset=" + api.encoding req.send_http_header()