OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce MySQL Connection Timeout

This topic contains 4 replies, has 2 voices, and was last updated by  Chris 9 months, 2 weeks ago.

  • Creator
    Topic
  • #37300

    Chris
    Participant

    I am having trouble running the OroCommerce installation script (for version 3.0). I get a “MySQL server has gone away” error when it gets to UpdateEntityConfigMigration.

    I am using the PDO MySQL driver, connecting to an offloaded MySQL server that has a 10 second connection timeout (this cannot be changed). It seems this timeout is being exceeded. I believe I need to either reflect this timeout in my OroCommerce settings or disable persistent connections. However, I am not sure how to do so.

    I see “database_driver_options: { }” in parameters.yml but I can’t find any examples of valid syntax for this. I need to set either PDO::ATTR_PERSISTENT or PDO::ATTR_TIMEOUT.

    Thanks in advance if anyone can help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #37301

    Chris
    Participant

    Here is the actual output that demonstrates the error I am getting:

    The application meets all mandatory requirements
    Setting up database.
    Process migrations…
    > Oro\Bundle\EntityExtendBundle\Migration\LoadEntityConfigStateMigration
    > Oro\Bundle\MigrationBundle\Migration\UpdateBundleVersionMigration
    > Oro\Bundle\CheckoutBundle\Migrations\Schema\RemoveWorkflowFieldsMigration
    > Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration
    > Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration
    PHP Warning: PDOStatement::execute(): MySQL server has gone away in /var/www/goldlightdist.com/oroapp/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 141
    PHP Warning: PDOStatement::execute(): Error reading result set’s header in /var/www/goldlightdist.com/oroapp/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 141

    > Oro\Bundle\EntitySerializedFieldsBundle\Migration\SerializedDataMigration
    PHP Warning: PDOStatement::execute(): MySQL server has gone away in /var/www/goldlightdist.com/oroapp/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 141
    PHP Warning: PDOStatement::execute(): Error reading result set’s header in /var/www/goldlightdist.com/oroapp/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 141
    ERROR: An exception occurred while executing ‘SELECT class_name, data FROM oro_entity_config WHERE mode = ?’ with params [“default”]:

    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration – skipped
    > Oro\Bundle\ActivityContactBundle\Migration\ActivityContactMigration – skipped
    > Oro\Bundle\ActivityListBundle\Migration\ActivityListMigration – skipped
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigration – skipped
    > Oro\Bundle\EntityConfigBundle\Migration\WarmUpEntityConfigCacheMigration – skipped

    In MigrationExecutor.php line 116:

    Failed migrations: Oro\Bundle\EntitySerializedFieldsBundle\Migration\Serial
    izedDataMigration.

    #37302

    Chris
    Participant

    UPDATE: I tried installing to a local MySQL server, following the installation instructions at https://oroinc.com/b2b-ecommerce/doc/current/install-upgrade/installation-quick-start-dev/commerce-crm#prepare-mysql-database

    Still getting the same error. I literally maxed out every MySQL timeout value there is. Same error. I tried modifying the OroRequirements.php file directly to change the PDO parameters (PDO::ATTR_PERSISTENT or PDO::ATTR_TIMEOUT). Same error.

    Any other suggestions?

    #37308
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Please share used MySQL version and Operation System.

    Also try the following settings for MySQL, usualy it helps.

    Thank you.

    #37309

    Chris
    Participant

    Thanks for the response. I tried these settings and am receiving the same error. Below are my software versions.

    MySQL: Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper
    CentOS: centos-release-7-5.1804.4.el7.centos.x86_64

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No