w3wp.exe memory usage remains high after making web service calls

324 views Asked by At

I have set up one server with a PHP application and an .asmx web service application.

My PHP application makes frequent calls to web service functions inside this .asmx file. They in turn retrieve data from a database to be used in the PHP application. Here is my PHP code:

public function callService($file, $web_service, $parameters){
    if(defined("WEB_SERVICES_PATH")){
        try{
            $wsdl = WEB_SERVICES_PATH.$file."?wsdl";
            $client = new SoapClient ($wsdl, array('cache_wsdl' => WSDL_CACHE_NONE) );                
            $result = $client->{$web_service}($parameters)->{$web_service."Result"};
            return $result;
        }
        catch(Exception $e){
          //handle error
        }
    }
}

I noticed in some instances that some web service calls cause the w3wp process to chew up a lot of memory. In some instances, the process will start of at around 80,000KB but then grow to around 800,000KB

Furthermore, the process seems to linger at around 800,000kb unless i kill it or restart IIS.

I have effectively two questions about this. Firstly, why would the memory not be released after the web service calls? and secondly, what factors would cause the w3wp process from chewing up so much memory?

0

There are 0 answers