Allowed memory size exhausted in Pdo/Abstract.php on line 128

After running

php bin/magento setup:upgrade

I get the following error:

PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 20480 bytes) 
in [magento2_root]/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php on line 128

Here is the try/catch block that is throwing the error:

try {
    $this->_connection = new PDO(
        $dsn,
        $this->_config['username'],
        $this->_config['password'],
        $this->_config['driver_options'] /* Line 128 */
    );

    $this->_profiler->queryEnd($q);

    // set the PDO connection to perform case-folding on array keys, or not
    $this->_connection->setAttribute(PDO::ATTR_CASE, $this->_caseFolding);

    // always use exceptions.
    $this->_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

} catch (PDOException $e) {
    /**
    * @see Zend_Db_Adapter_Exception
    */
    #require_once 'Zend/Db/Adapter/Exception.php';
    throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e);
}

 

Note: I Currently have memory_limit set to 4G in my php.ini and if I increase it to any amount I get a similar error.

 

Can anyone tell me why I am getting this error? It seems to be database related, but I am unfamiliar with how to configure “driver_options” in this scenario.

 

Thanks

-Pat