[OJS 3.3.0.8] Site blocked when trying to send an email

Hi at all! I would need support to figure out the problem on a site where it crashes with the spin rotating endlessly at the time of assigning reviewers and has to send the assignment email.

from php error log shows me this error:

[Wed Nov 03 09:10:40.057692 2021]
[php7:error]
[pid 8662:tid 140293412214528]
[client 10.200.225.10:50444] PHP Fatal error: Uncaught Error: Call to a member function getConnection() on null in /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php:74\nStack trace:\n#0 /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php(200): Illuminate\Database\Capsule\Manager::connection()\n#1 /var/www/vhosts/ejh.it/lib/pkp/classes/db/DAO.inc.php(65): Illuminate\Database\Capsule\Manager::__callStatic(‘raw’, Array)\n#2 /var/www/vhosts/ejh.it/lib/pkp/classes/context/ContextDAO.inc.php(63): DAO->retrieve(‘SELECT * FROM j…’, Array)\n#3 /var/www/vhosts/ejh.it/lib/pkp/classes/core/PKPRouter.inc.php(252): ContextDAO->getByPath(‘ejh’)\n#4 /var/www/vhosts/ejh.it/lib/pkp/classes/core/PKPRequest.inc.php(760): PKPRouter->getContext(Object(Request), 1)\n#5 /var/www/vhosts/ejh.it/classes/core/Request.inc.php(64): PKPRequest->_delegateToRouter(‘getContext’, 1)\n#6 /var/www/vhosts/ejh.it/lib/pkp/classes/plugins/LazyLoadPlugin.inc.php(102): Request->getContext()\n#7 /var in /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74

[Wed Nov 03 09:11:15.932798 2021]
[php7:warn]
[pid 8496:tid 140293507585792]
[client 10.200.225.10:51364] PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php/session) in /var/www/vhosts/ejh.it/lib/pkp/classes/session/SessionManager.inc.php on line 58, referer: PDF.js viewer

[Wed Nov 03 09:11:15.932985 2021]
[php7:error]
[pid 8496:tid 140293507585792]
[client 10.200.225.10:51364] PHP Fatal error: Uncaught PDOException: SQLSTATE
[HY000]
[2002] No such file or directory in /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:38\nStack trace:\n#0 /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(38): PDO->__construct(‘mysql:host=loca…’, ‘ojs’, ‘ojs’, Array)\n#1 /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(67): Doctrine\DBAL\Driver\PDOConnection->__construct(‘mysql:host=loca…’, ‘ojs’, ‘ojs’, Array)\n#2 /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\Database\Connectors\Connector->createPdoConnection(‘mysql:host=loca…’, ‘ojs’, ‘ojs’, Array)\n#3 /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection(‘mysql:host=loca…’, Array, Array)\n#4 /var/www/vhosts/e in /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671, referer: PDF.js viewer

thanks for any help!
Bye
Tiziano

Hi! Nobody help?

Thanks.
Bye
Tiziano

Hi @Tiziano,

I don’t see anything related to the Reviewer Assignment or email in the error messages. Is it the whole stack trace or it’s truncated?

Also, can you double-check and inspect the log just after reproducing the problem? It can help to filter out unrelated messages.

Hi @Vitaliy , thanks for support, when it gave an error I immediately retrieved the log, and copied the two php fatal errors I found. What are these that I mentioned referring to?

Thanks
Bye
Tiziano

The time difference in those 2 fatal errors is around 30 sec, which means that they are from different requests.

Database connection problem.

About stack trace, e.g., in the first message in ends with:

n#6 /var/www/vhosts/ejh.it/lib/pkp/classes/plugins/LazyLoadPlugin.inc.php(102): Request->getContext()\n#7 /var in /var/www/vhosts/ejh.it/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74

It refers to the LazyLoadPlugin class, I suspect it doesn’t end up there; are there other entries after that line?

Also for debugging it may be useful with the browser’s dev tools to look which request is failing and inspect its data.

thanks @Vitaliy now I do a check on the site, and if it occurs again I recover the log again. I have no way now to verify.

Bye
Tiziano