Unable to loop through all nodes in a content type and load them without hitting memory limits
I was able to get this to work by using the following command pulled from the deprecated node_load() function.

\Drupal::entityManager()-&gt;getStorage('node')-&gt;resetCache(array('NID'));

The fixed script would be:

$query = \Drupal::entityQuery('node')
         -&gt;condition('type', 'product')
         -&gt;execute();
$nids = array_keys($query);

foreach ($nids as $nid) {
    $node = \Drupal\node\Entity\Node::load($nid);
    print $node-&gt;title-&gt;value;
    \Drupal::entityManager()-&gt;getStorage('node')-&gt;resetCache(array($nid));
}