[Tutor] Request Timeout
dman
dsh8290@rit.edu
Wed, 30 Jan 2002 00:15:37 -0500
On Tue, Jan 29, 2002 at 06:05:24PM -0800, Titu Kim wrote:
| I am writing a cgi script in python which posts a
| query to Oracle db. WHen the query takes long time, my
| browser get timeout message. How can i fix this
| problem to avoid timeout? I am not sure which side
| issue timeout(either browser, apache, or python cgi
| script). How can i fix this problem to make browser
| waits as long as it takes for oracle to return result?
| Thanks.
It's the browser that times out -- it figures the web server ain't
there if it's not saying anything. The best solution is to use some
sort of persistant handler with a pool of db connections. When a
request arrives it is given to a running process (persistant cgi, zope
object, whatever middleware you choose) that already has a connection
to Oracle. Thus the time to create a connection is eliminated.
(a not-really-a-solution solution is to increase the timeout values in
your browser, but then every visitor of your site has to do that too)
HTH,
-D
--
The fear of the Lord leads to life:
Then one rests content, untouched by trouble.
Proverbs 19:23