Hi,
I was looking over the recent changes in Application.py that switched from
using a Queue to a list for the servlet instance cache and noticed something
odd. There doesn't seem to be any limit on the size of the cache.
Line 105 reads
self._instanceCacheSize = self._server.setting('MaxServerThreads')
but self._instanceCacheSize isn't used anywhere.
'createServletInTransaction(self, transaction)' creates a new servlet instance
on line 990 if the cache is empty at the time of the request, but it doesn't
check to see how many instances have already been created. Likewise,
'returnInstance(self, transaction, path)' returns instances to the cache on
line 931 without checking to see how many instances are already in the cache.
Shouldn't _instanceCacheSize be used? It seems possible with the current code
for the number of instances to get out of control if there was a flood of
simultaneous requests.
Tavis
See
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/webware/Webware/WebKit/Application.py.diff?r1=1.137&r2=1.138
and
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/webware/Webware/WebKit/Application.py?rev=1.138&content-type=text/vnd.viewcvs-markup
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss