Small but significant memory leak in Pyana XSLT processor

O

Ola Natvig

Hi all

I'm working with a long running, threaded server which serves HTTP
requests with content which are passed through a XSLT processor. The
XSLT processor I'm using is the Pyana processor.

I have one compiled stylesheet which I uses to process all responses.
This way I only need to read and compile the stylesheet once.

When serving a rather small page 404-page I get the server to process
300-400 requests per second over a LAN connection. This is from the
apache benchmark program, I don't know how reliable these numbers are
but they give me some guidance.

My problem:

When serving my content without the XSLT processor the process size
remains the same size. (about 18MB in the windows task manager). But
when I use the XSLT processor the process will slowly gain size. About
1MB for each 10k requests, and this memory are not freed.

I feel certain that the leak are located in the XSLT processor since the
problem occurs when that is plugged into the system.

There is not much wrapping code so I don't think the problem are of that
manner.

So I wonder if anyone have had the same experience with this XSLT
toolkit before and if you were able to fix it.

The software I'm using on the computer I've done the tests on:

Python 2.4 (ActivePython)
Pyana 0.9.2
Win XP Pro SP2

I've tried with both precompiled and self compiled versions of the Pyana
package.

ola
 
B

Brian Quinlan

Ola said:
My problem:

When serving my content without the XSLT processor the process size
remains the same size. (about 18MB in the windows task manager). But
when I use the XSLT processor the process will slowly gain size. About
1MB for each 10k requests, and this memory are not freed.

I feel certain that the leak are located in the XSLT processor since the
problem occurs when that is plugged into the system.

There is not much wrapping code so I don't think the problem are of that
manner.

So I wonder if anyone have had the same experience with this XSLT
toolkit before and if you were able to fix it.

I'm the author of the Pyana package and, to the best of my knowledge,
Pyana does not have any memory leaks. It seems like there are three
possibilities: your code is leaking somehow (seems unlikely based on
the above), Pyana is leaking (very possible) or Xalan is leaking (very
possible).

If Pyana is leaking then it is likely that the problem can be fairly
easily isolated and fixed (by me). Would it be possible for you to
isolate the leaking code and send it to me? If that is not possible,
then let me know and I can recommend steps to help find the problem
youself.

Cheers,
Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top