Hi all,
playing with a profiler today I noticed that AbstractService keeps a hold on HttpServletRequest,
which seems to me quite a bad move, althought I cannot prove this leads to memory leaks
based on the data I have.
Request and response objects are to be passed around without using fields, this is making our
servlets hold potentiall big stuff around, and makes them non thread safe too. Since the servlet
is registered in and created by Spring as a singleton bean, we'll have just one servicing
all requests, so it must be thread safe, isn't it?
Or else, I'm missig something...
Cheers
Andrea Aime
aaime@anonymised.com ha scritto:
Hi all,
playing with a profiler today I noticed that AbstractService keeps a hold on HttpServletRequest,
which seems to me quite a bad move, althought I cannot prove this leads to memory leaks
based on the data I have.
Request and response objects are to be passed around without using fields, this is making our
servlets hold potentiall big stuff around, and makes them non thread safe too. Since the servlet
is registered in and created by Spring as a singleton bean, we'll have just one servicing
all requests, so it must be thread safe, isn't it?
Or else, I'm missig something...
On my pc I've made sure I don't keep response as a field, and I already saw improvements (versus
the OOM under load and small heap) so it seems to be the right thing to do.
Cheers
Andrea
Agree, having the request as field of the AbstractService seems to be dangerous to me too and even a waste of memory.
On 10/10/06, aaime@anonymised.com <aaime@anonymised.com> wrote:
aaime@anonymised.com ha scritto:
Hi all,
playing with a profiler today I noticed that AbstractService keeps a
hold on HttpServletRequest,
which seems to me quite a bad move, althought I cannot prove this leads
to memory leaks
based on the data I have.
Request and response objects are to be passed around without using
fields, this is making our
servlets hold potentiall big stuff around, and makes them non thread
safe too. Since the servlet
is registered in and created by Spring as a singleton bean, we’ll have
just one servicing
all requests, so it must be thread safe, isn’t it?
Or else, I’m missig something…
On my pc I’ve made sure I don’t keep response as a field, and I already
saw improvements (versus
the OOM under load and small heap) so it seems to be the right thing to do.
Cheers
Andrea
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys – and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
–
Eng. Alessio Fabiani
Vice President/CTO GeoSolutions
http://www.geo-solutions.it