Failed Ajax request or invalid JSON returned - OJS 3.3.0.8

After updating my OJS to 3.3.0.8, when adding new avaliators to an article, i get multiple times the error “Failed Ajax request or invalid JSON returned”.

The only solution i foung is to keep trying and sometimes it gets thru and shows the available avaliators.

Here is the php error log:

[07-Jul-2022 15:04:29 America/Sao_Paulo] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115
Stack trace:
#0 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute(NULL)
#1 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(370): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array)
#3 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(745): Illuminate\Database\Connection->runQueryCallback(Object(Illuminate\Database\Query\Expression), Array, Object(Closure))
#4 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/fram in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671
[07-Jul-2022 15:05:29 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:05:29 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): Error reading result set’s header in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:06:14 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:06:14 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): Error reading result set’s header in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:06:14 America/Sao_Paulo] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115
Stack trace:
#0 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute(NULL)
#1 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(370): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array)
#3 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(745): Illuminate\Database\Connection->runQueryCallback(Object(Illuminate\Database\Query\Expression), Array, Object(Closure))
#4 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/fram in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671
[07-Jul-2022 15:06:59 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:06:59 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): Error reading result set’s header in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:07:44 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:07:44 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): Error reading result set’s header in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:07:44 America/Sao_Paulo] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115
Stack trace:
#0 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute(NULL)
#1 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(370): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array)
#3 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(745): Illuminate\Database\Connection->runQueryCallback(Object(Illuminate\Database\Query\Expression), Array, Object(Closure))
#4 /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/fram in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671
[07-Jul-2022 15:08:44 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:08:44 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): Error reading result set’s header in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:10:14 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): MySQL server has gone away in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115
[07-Jul-2022 15:10:14 America/Sao_Paulo] PHP Warning: PDOStatement::execute(): Error reading result set’s header in /home/dpgpsifp/psicodebate/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 115

I found a similar topic, but with no answer: OJS 3.2 error: Failed Ajax request or invalid JSON returned

Hi @Hugo_Melo

Your error_log file shows that your DB is closing the connection to your application. The thread below shows some suggestions to fix it:

Best,
Israel

Well, for the record, I updated the version of php in the site, from 7.3 to 7.4 and the error frequency got lower, but persists.
I will try further versions of php…

1 Like

Keeping the log:

Increasing the max_execution_time or max_input_time had no effect.

Increasing the post_max_size or memory_limit had no effect either.

Next move, try to increase the max_allowed_packet .

Today I lost patience with how often this error was appearing and risked an emergency update to version 3.3.0.11 LTS.

The error apparently disappeared completely, it was the only solution to the problem I found.

1 Like