Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-60

PythonOption directive causes memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.1.3, 3.1.4, 3.2.7
    • 3.2.7
    • core
    • None
    • Linux

    Description

      This was previously reported on the mod_python mailing list. See http://www.modpython.org/pipermail/mod_python/2004-April/015395.html

      A memory leak results when there is a PythonOption directive in the apache config file. Leak occurs when PythonOption is in either <VirtualHost> or <Directory> section.

      For each request, approx 25 bytes of memory is leaked per PythonOption directive.

      Methodolgy (using top to gauge memory usage, 100,000 requests per test case):

      def handler(req):
      req.content_type = 'text/plain'
      req.write('PythonOption test\n')
      return apache.OK

      1. No PythonOption directives:
      1.4 % MEM

      2. 50 PythonOption directives:
      11.3% MEM

      3. 100 PythonOption directives:
      25.4 % MEM

      I know 50 or 100 PythonOptions is not likely in a production system, but it clearly demonstrate the leak.

      Attachments

        Activity

          People

            jgallacher James Paul Gallacher
            jgallacher James Paul Gallacher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: