Site error log grew to 180 GB, related to xPDOObject.php

Overnight one of our sites’ error log grew to over 180GB. Looking at the log it was all one of the same error.

/core/vendor/xpdo/xpdo/src/xPDO/Om/xPDOObject.php : 1447) Error 22003 executing statement:
UPDATE `modx_deprecated_call` SET `call_count` = 4294969081 WHERE `id` = 257
Array
(
    [0] => 22003
    [1] => 1264
    [2] => Out of range value for column 'call_count' at row 1
)

I have two main questions.

What does the 1264 number refer too?

After inspecting this row in the database, I’m referred to xPDO.php, specifically line 808. It’s telling me loadClass is depreciated. What can I do to solve?

public function newObject($className, $fields= array ()) {
        $instance= null;
        if ($className = $this->loadClass($className)) {
            $className = self::getPlatformClass($className);
            /** @var Om\xPDOObject $instance */
            if ($instance = new $className($this)) {
                if (is_array($fields) && !empty($fields)) {
                    $instance->fromArray($fields);
                }
            }
        }
        return $instance;
    }

I can provide any further information at request.

It’s an overflow in the database column call_count of the table modx_deprecated_call.
The deprecated method has been called too many times.


To avoid this, you could for example set the system setting log_deprecated to No. The use of deprecated methods will no longer be logged.

Or you could clear the deprecated log. Menu “Manage” → “Reports” → “Error Log” → tab “Deprecations Log” → Click the “Clear” button on the left above the grid.
This will clear the log, but the issue may reoccur after a while.


What exactly are the values of the row in the database table (id = 257) that is called so many times? Maybe this can be fixed in the code (e.g. by updating an extra).

1 Like

Thank you.

`modx_deprecated_call` (`id`, `method`, `call_count`, `caller`, `caller_file`, `caller_line`) VALUES
(257, 11, 2600552, 'xPDO\\xPDO::newObject', '/xxxx/xxxxxx/xxxxx/xxxxxx/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php', 808);

I’ve now set that setting to no, thanks for the advice.

My thought was an extension issue, but I don’t see any pointers to which one.

You could check the database table modx_deprecated_method to see what the method with id = 11 is. This may give you a hint, what the deprecated line of code is.
But it probably won’t help to locate the exact line of code. It has to be something that gets executed quite a lot (to create an overflow of the counter).

1 Like