dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasgoMobi

Posted by cornilliat 1 year 40 weeks ago

pic
 cornilliat
mobiForge Newbie
Posts: 4
Joined: 2 years ago
[offline]

Hi,
I have a blocking issue using DA Beta 2.3. Can you help ?

The issue is with Mobi_Mtld_DA_Api::getTreeFromFile(json/DeviceAtlas.json) which never completes while raising no exception. The following code displays
'getTreeFromFile to start'
but never
'getTreeFromFile complete'.
It seems code execution is stalled or stuck in endless loop.

Code:

require_once 'library/Mobi/Mtld/DA/Api.php';
echo 'getTreeFromFile to start';
try{
$tree = Mobi_Mtld_DA_Api::getTreeFromFile('json/DeviceAtlas.json');
} catch (Mobi_Mtld_DA_Exception_JsonException $e) {
echo 'error :'.$e;
}
echo 'getTreeFromFile complete';

The server configuration is Linux / Apache 2.2.13 / PHP 5.2.11 / json enabled / json 1.2.1
DeviceAtlas version is : beta 2.3 / DeviceAtlas.json is latest file, dated April 30th, 2010.

DeviceAtlas.json file rights are rwx/r--/r-- (should be OK)

Thanks for your help.

BC

Posted by cornilliat 1 year ago

pic
 cornilliat
mobiForge Newbie
Posts: 4
Joined: 2 years ago
[offline]

Hi,
in PHP logs I found the following message when trying to execute

$tree = Mobi_Mtld_DA_Api::getTreeFromFile('json/Sample.json');

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 64 bytes) in /var/www/vhosts/mobile-spot.com/httpdocs/all/jhKl18j8zz2j776HjhtxpPOpid/mobispot/DA/DeviceAtlas_PHP_API_Beta_2.3/sample/library/Mobi/Mtld/DA/Api.php on line 121

(in php.ini, memory_limit is set to 32MB).

So it seems it 's a memory exhaustion issue. Is that normal ? If yes, what would be the required memory_limit then ?

Thanks for your kind help.