Modx after moving to another server started to eat memory, why?

On request, some parts of the site throws 500 error
in the logs
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home/~/public_html/core/model/modx/modresource.class.php on line 881

this method getAliasPath this class

on line 881

while ($currResource) {
$parentAlias= $currResource['alias'];
 if (empty ($parentAlias)) {
 $parentAlias= "{$pathParentId}";
}
 $parentResources[]= "{$parentAlias}";
 $pathParentId= $currResource['parent'];
881-> $query->stmt->execute(array($pathParentId));
 $currResource= $query->stmt->fetch(PDO::FETCH_ASSOC);
 }
July 2nd 19 at 17:35
1 answer
July 2nd 19 at 17:37
Solution
The problem was the following:
When migrating a database from another server, did not pay attention that the import occurred by mistake, because the site to work, signs all over the place.
Import occurs in the following sequence:
1. Creating tables
2. Assign primary keys and indexes fields
3. The purpose of the AutoNumber fields (primary)
4. Adding data

The error occurred at the stage of appointment of primary keys, indexes, and autoincrement. Because of this, I got a plate, but no primary keys, indexes, and autoincrement, in most of the tables.

In this regard, when adding a new resource, its id was administered at 0, all inhibited, etc.

Specifically the code above, hung in an infinite loop.

Find more questions by tags MODX