Problem/Motivation

I selected "project_browser" module to check it but I got the following error

631a3dd30624940e75bcaa6b# /bin/sh -c cd "${DOCROOT}" && ../vendor/bin/drush si standard --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat --account-name=admin --account-pass=admin -y
You are about to:
 * Create a sites/default/settings.php file
 * DROP all tables in your 'tugboat' database.
// Do you want to continue?: yes.
[notice] Starting Drupal installation. This takes a while.
[notice] Performed install task: install_select_language
[notice] Performed install task: install_select_profile
[notice] Performed install task: install_load_profile
[notice] Performed install task: install_verify_requirements
[notice] Performed install task: install_settings_form
[notice] Performed install task: install_verify_database_ready
[notice] Performed install task: install_base_system
[notice] Performed install task: install_bootstrap_full
[notice] Performed install task: install_profile_modules
[notice] Performed install task: install_profile_themes
[notice] Performed install task: install_install_profile
[notice] Performed install task: install_configure_form
[notice] Performed install task: install_finished
 [success] Installation complete.
631a3dd30624940e75bcaa6b# /bin/sh -c cd "${DOCROOT}" && ../vendor/bin/drush en project_browser -y
In ExceptionHandler.php line 38:
                                                                               
  SQLSTATE[08S01]: Communication link failure: 1153 Got a packet bigger than   
  'max_allowed_packet' bytes                                                   
                                                                               

In StatementWrapper.php line 145:
                                                                               
  SQLSTATE[08S01]: Communication link failure: 1153 Got a packet bigger than   
  'max_allowed_packet' bytes
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/lib/tugboat/stm/web/core/lib/Drupal/Core/Database/StatementWrapper.php:145
Stack trace:
#0 /var/lib/tugboat/stm/web/core/lib/Drupal/Core/Database/StatementWrapper.php(145): PDOStatement->execute(Array)
#1 /var/lib/tugboat/stm/web/core/lib/Drupal/Core/Database/Query/Upsert.php(115): Drupal\Core\Database\StatementWrapper->execute(Array, Array)
#2 /var/lib/tugboat/stm/web/core/lib/Drupal/Core/Cache/DatabaseBackend.php(273): Drupal\Core\Database\Query\Upsert->execute()
#3 /var/lib/tugboat/stm/web/core/lib/Drupal/Core/Cache/DatabaseBackend.php(205): Drupal\Core\Cache\DatabaseBackend->doSetMultiple(Array)
#4 /var/lib/tugboat/stm/web/core/lib/Drupal/Core/Cache/DatabaseBackend.php(181): Drupal\Core\Cache\DatabaseBackend->setMultiple(Array)
#5 /var/lib/tugboat/stm/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(338): Drupal\Core\Cache\DatabaseBackend->set('module_implemen...', Array)
#6 /var/lib/tugboat/stm/web/core/lib in /var/lib/tugboat/stm/web/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php on line 53
Command Failed (Tugboat Error 1064): Exit code (1)

Issue fork simplytest-3308702

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dimitriskr created an issue. See original summary.

mahtab_alam made their first commit to this issue’s fork.

mglaman’s picture

Status: Active » Reviewed & tested by the community

I took a quick glance, and it seems like the appropriate fix. The PHP settings change could go into the base previews, but we still have those locked up in a private repo

chrisfromredfin’s picture

Should this also revert https://git.drupalcode.org/project/simplytest/-/commit/7fe8833 since it seemingly had no effect?

Akhil Babu made their first commit to this issue’s fork.

rachel_norfolk’s picture

Status: Reviewed & tested by the community » Needs review
rachel_norfolk’s picture

Status: Needs review » Reviewed & tested by the community

So, with the PR (!) applied, the project browser does run. It is giving sensible composer commands to install, etc etc.

rachel_norfolk’s picture

Status: Reviewed & tested by the community » Needs work

I am an idiot and didn’t run the unit tests! They need work...

rachel_norfolk’s picture

Updated the tests pretty much according to the revised configuration BUT I’m not happy with simply changing the php memory limit to 512M. It seems wildly excessive for just one module???

mglaman’s picture

I think it's fine to just bump to 512MB. Project Browser does some expensive stuff and I don't think it has been optimized yet. I'm not sure our normal memory limit. But it's not like it'll always be consuming 512MB. Bumping it higher may also allow better testing of modules like Feeds.

Looks like the default used to be 256 https://git.drupalcode.org/search?search=memory_limit&nav_source=navbar&... I don't know if this is our current.

Does Project Browser require 512 or would 256 work?

rachel_norfolk’s picture

Good question on what the actual requirement is. I just noted 512M in the original MR. Will inquire…

chrisfromredfin’s picture

Hi all -

Just wanted to point out that you seem to be talking about PHP `memory_limit,` but this issue is actually related to MySQL `max_allowed_packet` - how big of a packet you can inject in, say, an INSERT statement.

We are using very large insert statements in our install process, because we are populating a database table from a json fixture (fixtures/project_data.json). Note that this is temporary because this is our workable mock alternative to having an actual JSON:API endpoint live on a production Drupal 10 instance.

33554432 is ~32MB, and probably would work. With that said, I should point out that this fix never actually worked to make Project Browser installable in SimplyTest.me. (see comment #9 - https://www.drupal.org/project/simplytest/issues/3308702#comment-14838997 - above)

rachel_norfolk’s picture

Hi Chris - the change includes both right now - a new max_allowed_packet and a PHP memory size. I have no problem with the max_allowed_packet. I'm just querying the PHP memory size change.

See https://github.com/simplytestme/website/pull/350/files#diff-188015a49750... for reference.

rachel_norfolk’s picture

chrisfromredfin’s picture

Oh, wonderful! I missed that. So to that I can say I don't anticipate we need 512, I believe 256 should be adequate *for us* anyway. :)

chrisfromredfin’s picture

Coming back to reference https://www.drupal.org/project/project_browser/issues/3420698#comment-15... - in that I tested and could get it down as far as 192 if that mattered. Looks like we've already discussed 256 also. I am going to close the related issue in Project Browser since that was to get this answer. :)