Drupal content can contain dependencies, such as node references, which rely on other content. Acquia Content Hub can export content to the central hub, including the dependent content. This includes websites with complex, nested, highly interdependent content.
When sharing content with Acquia Content Hub, be aware of what content may relate to it. Acquia Content Hub must examine each of those entities for content related to them. With some complex data relationships, the data may not have room to fit within the memory footprint allowed by the server.
As an example, your website may have content related to a particular office. That office may have relationships with the other members of the office. Those members can have relationships with their work groups, which may have relationships with other offices.
If all your content relates to other content, you can export your entire website to Acquia Content Hub each time a piece of content updates. This approach changes a minor update into a large set of requests sent to Acquia Content Hub, and has the potential to cause serious performance issues for your website.
To prevent these types of occurrences, Acquia Content Hub takes precautionary steps. Users can create their own queue using Drupal’s Queue operations system (or another queue system of your choice).
Acquia Content Hub can use the queue to help limit the amount of data processed on both the subscriber and publisher websites.
The number of dependency levels checked
The number of dependencies to load
The number of dependent entities to send or receive
In Drupal 7, deferred entities are available to other modules for custom processing by using the following hooks:
When preparing to publish content, Acquia Content Hub reviews both the number of nodes and how many levels of referenced content to send. This content is then processed, and any remaining content moves to the queue. Variable names are dependent on your Drupal version, and are described as follows:
Drupal 9: Drupal 9 has a single parameter to limit exported dependencies.
dependency_depth parameter limits the level of dependencies
to evaluate, but doesn’t limit the actual number of
exported items. This parameter can be also set by using Drush.
drush config-set acquia_contenthub.entity_config dependency_depth 3
This example sets the value to
3 (which is the default), and
indicates that exporting collects entities on the first three level
Drupal 7: The following variables can be set for export:
FALSE - When
TRUE, this tracks which
items that have changed, and doesn’t send unchanged items. This
feature is still under development.
Based on the default values for these variables, Acquia Content Hub will initially evaluate up to 30 levels of dependent content, and then load and send up to 500 items to the service.
If Acquia Content Hub reaches its send limits, the following warning message displays:
Content dependency limits were reached. Not all dependencies were submitted to Content Hub.
A message also records in the status report (Reports > Status report),
content_hub_connector, which states how many items
Acquia Content Hub sent to the queue, and will look like the following
entity limit enforced: X not charted, Y not loaded, Z not sent
Z are the number of items not
The queue will process during standard Drupal cron runs.
When importing content from Acquia Content Hub, the amount of discovered and imported content also faces limitations based on dependency levels.
Variable names on the subscribing website:
limits the levels of dependent content to import
You can use Drush to check the import queue variable values and status, which returns the following items and their current values:
max dependency gap
When using queues for Acquia Content Hub, it’s good practice to switch the
default queue processing class from
MemoryLimitDatabaseQueue, which the module provides. This class
provides a graceful process termination when facing issues related to memory
To switch the default queue processing class, add the following lines to the
settings.php file after the
Acquia require line:
$settings['queue_service_acquia_contenthub_export_queue'] = 'acquia_contenthub.queue.database.memory_limit'; $settings['queue_service_acquia_contenthub_import_queue'] = 'acquia_contenthub.queue.database.memory_limit';
Acquia Content Hub, by default, uses Drupal’s queueing system. When the system detects an update needs to send to the central hub, it analyzes the number of changes Acquia Content Hub must process. It then sends the first batch of content to the hub, and adds the rest of the content to the queue. Processing the queue should complete in under five minutes in most circumstances.
If you have your own queuing solution, it’s possible to use that solution in place of what Acquia Content Hub provides.