2

I use WSO2 ESB 4.5.1 on Windows. My problem is that the temp folder WSO2_HOME/tmp is growing up and never cleaned.

I found out that the problem comes from the xslt mediator, everytime it transform a big xml file (~15kb) a new temp file is created.

Does anyone have an idea why these tmp files are not cleaned up?

Proxy:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="input" transports="vfs" startOnLoad="true" trace="disable">
    <parameter name="transport.PollInterval">5</parameter>
    <parameter name="transport.vfs.FileURI">vfs:file://C:/WSO2/Test/From</parameter>
    <parameter name="transport.vfs.FileNamePattern">.*[.].*</parameter>
    <parameter name="transport.vfs.ContentType">application/xml</parameter>
    <target faultSequence="errorSequence">
        <inSequence>
            <log level="full"/>
            <property name="ClientApiNonBlocking" scope="axis2" action="remove"/>
            <property name="OUT_ONLY" value="true"/>   
            <xslt key="avintis_xml_indent"/>
            <property name="transport.vfs.ReplyFileName" expression="fn:concat('out_', $trp:FILE_NAME, '.xml')" scope="transport"/>
            <send>
                <endpoint>
                    <address uri="vfs:file://C:/WSO2/Test/To"/>
                </endpoint>
            </send>
        </inSequence>
    </target>
</proxy>

XSLT:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:avintis="http://www.avintis.com/esb"
  xmlns:urn="urn:hl7-org:v2xml" version="2.0"
  xmlns:payload="http://ws.apache.org/commons/ns/payload">
  <xsl:output method="xml" encoding="UTF-8" indent="yes"/>

  <xsl:template match="*|text()|@*">
    <xsl:copy>
      <xsl:apply-templates select="*|text()|@*"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

inputfile:

any xml file bigger than ~15kb
4

1 回答 1

1

似乎临时文件没有被 HouseKeeping 任务清理。要使用管家任务清理它们,您可以在 Carbon.xml 中配置它,如下所示。

   <WorkDirectory>${carbon.home}/tmp/work</WorkDirectory>

   <家政>

       <自动启动>true</自动启动>

       <间隔>10</间隔>

       <MaxTempFileLifetime>30</MaxTempFileLifetime>
   </家政>

于 2013-09-11T03:17:05.733 回答