WSF/PHP data services - Out of memory (Apache crash)

m.bechchi.bimedia.com.fr's picture
Hello, I'm using WSF/PHP data services library to develop data services as SOAP. The service works well but the apache memory usage rise, as the soap client is called, until it crashes both apache and postgresql servers. Can someone please tell me about this issue. Thanks.   My server : <?php require_once("DataService.php"); // database configurations $db_config = array( "db" => "pgsql", "username" => "postgres", "password" => "postgres", "dbname" => "DBTICKETS", "dbhost" => "localhost" );   // security configuration $pub_key = ws_get_cert_from_file("./clientsoapovh9.crt"); $pvt_key = ws_get_key_from_file("./servsoapovh9.key"); $pub_key_server = ws_get_cert_from_file("./servsoapovh9.crt"); $sec_array = array("sign"=>TRUE,"encrypt" => TRUE, "algorithmSuite" => "Basic256Rsa15", "securityTokenReference" => "IssuerSerial"); $policy = new WSPolicy(array("security"=>$sec_array)); $sec_token = new WSSecurityToken(array("privateKey" => $pvt_key, "receiverCertificate" =>$pub_key, "certificate" => $rec_cert_client));     $inputFormatticket = array("nim" => "STRING","datej" => "STRING","cb" => "STRING","fam" => "STRING"); $outputFormatticket = array("resultElement" => "listeticketjourResponse", "rowElement" => "ticket", "elements" => array( "id" => "id", "nul" => "nul", "heure" => "heure", "caisse" => "caisse", "emp" => "emp", "montant" => "montant", "mode" => "mode", "article" => "article", "z" => "z")); $sqlticket = "SELECT id,nul,heure,caisse,emp,montant,mode,article,z FROM ticket_liste_jour(?,?,'HEURE, MONTANT, NB_ARTICLE, PAIEMENT, CAISSE, EMPLOYE','ASC',?,?) ". "as (id int8, nul int8, heure timestamp, caisse int8, emp varchar, montant float8, mode varchar, article int4, z int8 )"; $operationsticket = array("inputFormat" => $inputFormatticket, "sql" => $sqlticket, "outputFormat" => $outputFormatticket);     $operations = array("listeticketjour" => $operationsticket); $actions = array("http://xxx/listeticketjour" => "listeticketjour"); $my_data_service = new DataService(array("config" => $db_config, "operations" => $operations, "actions" => $actions, "policy" => $policy, "securityToken" => $sec_token));   $my_data_service->reply(); ?>   My client : <?php $requestPayloadString = <<<XML <ns1:listeticketjour xmlns:ns1="http://xxx"> <ns1:nim>$nim</ns1:nim> <ns1:datej>$datej</ns1:datej> <ns1:cb>$cb</ns1:cb> <ns1:fam>$fam</ns1:fam> </ns1:listeticketjour> XML; $rec_cert = ws_get_cert_from_file("./keys/servsoapovh9.crt"); $pvt_key = ws_get_key_from_file("./keys/clientsoapovh9.key"); $rec_cert_client = ws_get_cert_from_file("./keys/clientsoapovh9.crt"); $reqMessage = new WSMessage($requestPayloadString, array("to" => "http://xxx/server.php", "action" => "http://xxx/listeticketjour")); $sec_array = array("sign"=>TRUE,"encrypt"=>TRUE, "algorithmSuite" => "Basic256Rsa15", "securityTokenReference" => "IssuerSerial"); $policy = new WSPolicy(array("security"=>$sec_array)); $sec_token = new WSSecurityToken(array("privateKey" => $pvt_key, "receiverCertificate" => $rec_cert, "certificate" => $rec_cert_client)); $client = new WSClient(array("useWSA" => TRUE, "policy" => $policy, "securityToken" => $sec_token));   $resMessage = $client->request($reqMessage); $response = $resMessage->str; ?>    
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
KeellsSuper is a leading supermarket chain with 50-plus outlets in Sri Lanka, and it offers the only online supermarket in the country. In 2005, JKH implemented SAP ERP across it’s 70 subsidiaries...
Thursday, February 16th 2012, 09.00 AM (PST)

Thursday, February 16th 2012, 10.00 AM (GMT)