Announcement

Collapse
No announcement yet.

Espo CRM failing after database change that caused an error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Espo CRM failing after database change that caused an error

    Hi EspoCRM forum,


    I encountered an issue while trying to alter my database by adding a new image field to my customer model. After upgrading from Espo using php-7.4 to Espo using php8.2 (Espo 7.3.2) I was missing the php-gd package responsible for handling images. This caused my system to crash with the following error message:

    [2023-02-07 09:10:15] ALERT: Rebuild database fault: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs in /var/www/html/espo/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:72 Stack trace: #0 /var/www/html/espo/vendor/doctrine/dbal/src/Driver/PDO/Connection.php(72): PDO->query() EspoCRM Forum /var/www/html/espo/vendor/doctrine/dbal/src/Connection.php(1049): Doctrine\DBAL\Driver\PDO\Connection->query() Forum /var/www/html/espo/application/Espo/Core/Utils/Database/Schema/Schema.php(218): Doctrine\DBAL\Connection->executeQuery() #3 /var/www/html/espo/application/Espo/Core/Utils/Database/Schema/SchemaProxy.php(58): Espo\Core\Utils\Database\Schema\Schema->rebuild() #4 /var/www/html/espo/application/Espo/Core/DataManager.php(145): Espo\Core\Utils\Database\Schema\SchemaProxy->rebuild() Groups /var/www/html/espo/application/Espo/Core/DataManager.php(110): Espo\Core\DataManager->rebuildDatabase() Uncategorized Groups /var/www/html/espo/application/Espo/Controllers/FieldManager.php(114): Espo\Core\DataManager->rebuild() Special /var/www/html/espo/application/Espo/Core/Api/ActionProcessor.php(88): Espo\Controllers\FieldManager->postActionCreate() Visitor Messages /var/www/html/espo/application/Espo/Core/Api/RequestProcessor.php(124): Espo\Core\Api\ActionProcessor->process() Private Messages /var/www/html/espo/application/Espo/Core/Api/RequestProcessor.php(95): Espo\Core\Api\RequestProcessor->proceed() Albums /var/www/html/espo/application/Espo/Core/Api/RequestProcessor.php(62): Espo\Core\Api\RequestProcessor->processInternal() #11 /var/www/html/espo/application/Espo/Core/Api/Starter.php(86): Espo\Core\Api\RequestProcessor->process() #12 /var/www/html/espo/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): Espo\Core\Api\Starter->Espo\Core\Api\{closure}() CSS Examples /var/www/html/espo/vendor/slim/slim/Slim/Routing/Route.php(384): Slim\Handlers\Strategies\RequestResponse->__invoke() #14 /var/www/html/espo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle() General Discussion /var/www/html/espo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle() Announcements /var/www/html/espo/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle() Feature Requests /var/www/html/espo/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run() Installation and Upgrade Help /var/www/html/espo/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\Routing\RouteRunner->handle() Extensions /var/www/html/espo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process() Developer Help /var/www/html/espo/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() Bug Reports /var/www/html/espo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process() Unminify assets or how to recreate t...o.min.js file? /var/www/html/espo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() /var/www/html/espo/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle() #24 /var/www/html/espo/vendor/slim/slim/Slim/App.php(199): Slim\App->handle() /var/www/html/espo/application/Espo/Core/Api/Starter.php(62): Slim\App->run() how to upgrade ? /var/www/html/espo/application/Espo/Core/ApplicationRunners/Api.php(45): Espo\Core\Api\Starter->start() /var/www/html/espo/application/Espo/Core/Application/RunnerRunner.php(87): Espo\Core\ApplicationRunners\Api->run() #28 /var/www/html/espo/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run() #29 /var/www/html/espo/public/api/v1/index.php(37): Espo\Core\Application->run() #30 {main} Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs in /var/www/html/espo/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:30 Stack trace: #0 /var/www/html/espo/vendor/doctrine/dbal/src/Driver/PDO/Connection.php(77): Doctrine\DBAL\Driver\PDO\Exception::new() EspoCRM Forum /var/www/html/espo/vendor/doctrine/dbal/src/Connection.php(1049): Doctrine\DBAL\Driver\PDO\Connection->query() Forum /var/www/html/espo/application/Espo/Core/Utils/Database/Schema/Schema.php(218): Doctrine\DBAL\Connection->executeQuery() #3 /var/www/html/espo/application/Espo/Core/Utils/Database/Schema/SchemaProxy.php(58): Espo\Core\Utils\Database\Schema\Schema->rebuild() #4 /var/www/html/espo/application/Espo/Core/DataManager.php(145): Espo\Core\Utils\Database\Schema\SchemaProxy->rebuild() Groups /var/www/html/b... [] []
    [2023-02-07 09:25:01] ERROR: (0) GD does not appear to be available in your PHP installation. Please try another generator; GET /; line: 18, file: /var/www/html/espo/vendor/yzalis/identicon/src/Identicon/Generator/GdGenerator.php [] []



    I realized that it happened due to php-gd not being available. Afterward, I installed php-gd and tried it again. However, now getting the error:


    2023-02-07 10:55:50] ERROR: (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lead.bauzeichnung_id' in 'field list'; GET /Lead/63da7f1d9a4b3fd7a/tasks; line: 70, file: /var/www/html/espo/application/Espo/ORM/SqlExecutor.php [] []
    [2023-02-07 10:56:02] ERROR: Uncaught Exception Spatie\Async\Output\ParallelError: "PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (/usr/lib/php/20220829/gd.so: undefined symbol: gdFontCacheShutdown), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 " at /var/www/html/espo/vendor/spatie/async/src/Output/ParallelError.php line 11 {"exception":"[object] (Spatie\\Async\\Output\\ParallelError(code: 0): PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20220829/gd.so (/usr/lib/php/20220829/gd.so: undefined symbol: gdFontCacheShutdown), /usr/lib/php/20220829/gd.so.so (/usr/lib/php/20220829/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0\n at /var/www/html/espo/vendor/spatie/async/src/Output/ParallelError.php:11)"} []

    As I understand the error, it means that my new image field is missing in my database. However, my migration file does think the field exists. Do you believe that is the case?

    And if so how can I sync my database with my migrations again or reset the database/migrations to a point at which everything was working successfully?

    Or could the error be caused by a different issue?

    Thank you for helping me.​

  • #2
    Hi SPO,

    Please provide screenshot of Administration -> Extensions.
    Do you have any customizations by codding?

    Comment


    • #3
      Vadym Thank you for your answer. Issue has been resolved. Reinstalling PhP(with new version of php-gd) and switching to medium blob as database field for images has solved the problem.

      Comment

      Working...
      X