Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: CLI Output not at all expected

Status Resolved
Add-on / Version DataGrab 4.2
Severity
EE Version 7

Caroline Blaker

Nov 30, 2022

What I did:

php wh14dmin/ee/eecli.php import:run --import_id=43 limit=30

What I got:

Check out this craziness:


/srv/users/serverpilot/apps/wh1-version-7#

php wh14dmin/ee/eecli.php import:run --import_id=43 limit=30
PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection timed out in /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php:78
Stack trace:
#0 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php(78): PDO->__construct('mysql:dbname=wh…', 'root', '', Array)
#1 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(86): CI_DB_mysqli_connection->open()
#2 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(255): CI_DB_driver->initialize()
#3 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(175): CI_DB_driver->simple_query('SELECT LOWER(mo…')
#4 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_active_rec.php(1083): CI_DB_driver->query('SELECT LOWER(mo…')
#5 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/models/addons_model.php(195): CI_DB_active_record->get('modules')
#6 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Service/Addon/Addon.php(65): Addons_model->get_installed_modules()
#7 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/libraries/Core.php(129): ExpressionEngine\Service\Addon\Addon->isInstalled()
#8 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Core/Core.php(139): EE_Core->bootstrap()
#9 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Core/Core.php(115): ExpressionEngine\Core\Core->bootCli()
#10 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#11 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/eecli.php(105): require_once('/srv/users/serv…')
#12 {main}
  thrown in /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php on line 78

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection timed out in /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php:78
Stack trace:
#0 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php(78): PDO->__construct('mysql:dbname=wh…', 'root', '', Array)
#1 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(86): CI_DB_mysqli_connection->open()
#2 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(255): CI_DB_driver->initialize()
#3 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(175): CI_DB_driver->simple_query('SELECT LOWER(mo…')
#4 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_active_rec.php(1083): CI_DB_driver->query('SELECT LOWER(mo…')
#5 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/models/addons_model.php(195): CI_DB_active_record->get('modules')
#6 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Service/Addon/Addon.php(65): Addons_model->get_installed_modules()
#7 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/libraries/Core.php(129): ExpressionEngine\Service\Addon\Addon->isInstalled()
#8 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Core/Core.php(139): EE_Core->bootstrap()
#9 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Core/Core.php(115): ExpressionEngine\Core\Core->bootCli()
#10 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#11 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/eecli.php(105): require_once('/srv/users/serv…')
#12 {main}
  thrown in /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php on line 78
The following error occurred: 
E_ERROR: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection timed out in /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php:78
Stack trace:
#0 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php(78): PDO->__construct('mysql:dbname=wh…', 'root', '', Array)
#1 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(86): CI_DB_mysqli_connection->open()
#2 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(255): CI_DB_driver->initialize()
#3 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_driver.php(175): CI_DB_driver->simple_query('SELECT LOWER(mo…')
#4 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/DB_active_rec.php(1083): CI_DB_driver->query('SELECT LOWER(mo…')
#5 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/models/addons_model.php(195): CI_DB_active_record->get('modules')
#6 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Service/Addon/Addon.php(65): Addons_model->get_installed_modules()
#7 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/libraries/Core.php(129): ExpressionEngine\Service\Addon\Addon->isInstalled()
#8 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Core/Core.php(139): EE_Core->bootstrap()
#9 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Core/Core.php(115): ExpressionEngine\Core\Core->bootCli()
#10 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#11 /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/eecli.php(105): require_once('/srv/users/serv…')
#12 {main}
  thrown 
File: /srv/users/serverpilot/apps/wh1-version-7/wh14dmin/ee/legacy/database/drivers/mysqli/mysqli_connection.php
Line: 78
root@wh1:/srv/users/serverpilot/apps/wh1-version-7#

It’s like it finishes but blasts this as it stops. Thanks so much for your help with our tickets thus far. This is the same site - I put a limit 30 to avoid memory issues and try to get Cron going in this environment. It doesn’t make sense that it’s timing out. It will run approx 2926 according to the logs via a browser call before it hits that memory limit (on old PHP and old EE, 3000 was our never-fail threshold, with a total capacity of about 5,000) - we are hoping that sussing out errors will get us back to “improved performance” expectations promised by PHP (8, one day) EE (7) and of course this add-on.

If you decide to help us debug on the site - we are running serverpilot and can easily add a key for you to gain access.

#1

BoldMinded (Brian)

This is just because the server is running out of resources. See the other thread for suggestions. Not much I can directly do for this.

#2

BoldMinded (Brian)

Other thread for future reference https://boldminded.com/support/ticket/2541

#3

Caroline Blaker

Re-opening to add that this was a problem with our domain using a legacy multi-env set up (which is popular) where we set variables to $_SERVER[‘http_host’] - this causing issues for all EECLI because it doesn’t set this variable in the command line environment. It was easily found, but not by us. Posting this in case it comes up again and helps someone. Thanks for all of your attention to this.

#4

BoldMinded (Brian)

Thanks for the update, Caroline!

Login to reply