[plt-scheme] connection pooling with schemeql and plt webserver

From: Daniel Roy (droy at MIT.EDU)
Date: Wed Oct 29 12:20:44 EST 2003

I wrote a website using schemeql+plt's webserver and am finding that after
a while connect-to-database fails with "too many connections" exception
being thrown.  i was under the impression that the connections were
garbage collected.  looking into connection.ss i found a "FIXME" that
talks about freeing environment handles.  is this the source of the leak?

(i've tried using the connection pool but there is no sharing of the
connection pool between instances of servlets... without some insight on
how to handle this possible environment leak problem i'll probably riddle
my code with explicit database connection "disconnect code"...

ideally, i'd like to implement some connection pooling *between* servlet
instances... one way i think this could be implemented would be to add
code to the web-server loop to create a pool of connections and then pass
these to the servlets when requests come in... (the overhead for opening
an odbc connection is high, i think)

any help would be GREATLY appreciated.

dan


Posted on the users mailing list.