I have a Drupal 9.5.11 site running well on a single EC2 instance and a remote MySQL server (RDS). I am trying to replicate a very similar scenario with a single EC2 instance but I am using AWS Elastic Beanstalk that does add some differences. Most notably I am using PHP-FPM. Both systems are using PHP 8.0. I need to stay on 8.0 because I also use CiviCRM.

I do not think this is an AWS problem however, because I am able to connect to the database using Drush and even run drush cron without errors. The issue only appears when accessing the website via the browser where the site fails to load. I am also getting the following error in Drush Watchdogs.

I get this error in the PHP-FPM logs and Watchdog logs.

[22-Nov-2023 17:02:43 America/Chicago] PHP Warning: PDOStatement::execute(): SSL: Broken pipe in /var/app/current/web/core/lib/Drupal/Core/Database/StatementWrapper.php on line 145

I am running PHP-FPM with debug logging to be able to get this warning.

This is a warning so I am not sure this is what is causing my site not to load but it is the only error message I am getting.

I have found similar issues on the Internet but they all appear to happen when the site is not able to connect to the database at all. Because I see this error in Watchdog logs I do not think that is the problem.

Any help is greatly appreciated.



Browse other questions tagged or ask your own question.