Using mod_ext_filter to run an exe

Discussion in 'Apache' started by JoeSaddigh, Jan 22, 2010.

  1. #1
    Hi,

    I am using mod_ext_filter to run a program (InfoReplace), which will use the standard input to read lines of html sent out by Apache. The purpose of this is to make Apache take the strain of this, maximizing the performance of the software. The InfoReplace program is responsible for reading the html passed in and replacing keywords of certain files and the output is sent to the browser.

    This works fine until an html file over approximately 65kb is processed and an infinite loop is caused in the info replace program. When debugging it seems to get to about the fifth line of html and then starts reading from the beginning. The web files that are large and do not work have been created in MS word. A temp solution was to save them as filtered, which solved the problem untill larger pages cropped up and were still over the specified size. Saving the pages as filtered cut down the file size considerably.

    After searching around the web, I came across a post which was made outlining something which seems to be the exact same problem.
    https://issues.apache.org/bugzilla/show_bug.cgi?id=29901

    ‘If the size of the file test.html reaches 65321 bytes, apache hangs and the
    page is never returned. Using apache.exe from the CLI makes a new window appear
    correponding to the filter. Killing the window un-hangs apache, but the data
    returned is not completed (only 49312 bytes).’

    When looking at the apache log, the error returned seems to be complaining about a resource being temporarily unavailable. The output of a line in the error.log is as follows:

    21 15:30:58 2010] [debug] mod_ext_filter.c(664): [client 192.168.16.221] apr_file_read(child output), len 4096, referer: http://mnldev52/NORTHSIM_090518/infolists.htm

    Unfortunately getting this working is critical in order to get the application working as it should.

    Does anybody know of any fixes that are available for this problem through some sort of configuration, a different plugin or how difficult it would be to fix the problem in the apache source for this apr_file_read method?

    Thanks in advance, any advice would be greatly received.
     
    JoeSaddigh, Jan 22, 2010 IP