Errors after rebuild WebIssues server

Submitted by shaupt on 2021-12-20

Hello all,

we had to rebuild our old WebIssues server because the operating system version is no longer supported. The new server uses AlmaLinux 8.5 and WebIssues version 1.1.5. The Database is the same as before.

Datenbankserver:MySQL 5.5.5-10.3.28-MariaDB

PHP-Version:7.2.24 (fpm-fcgi)

Web-Server:Apache/2.4.37 (AlmaLinux) OpenSSL/1.1.1k

Currently we always get errors when running the cronjob.

Unhandled System_Db_Exception: in /localhome/htdocs/webissues-server/system/db/mysqli/ on line 287
Stack trace:
#0 /localhome/htdocs/webissues-server/system/db/mysqli/ System_Db_Mysqli_Engine->handleError(Object(mysqli))
#1 /localhome/htdocs/webissues-server/system/db/mysqli/ System_Db_Mysqli_Engine->executeStatement('SELECT a.alert_...', Array)
#2 /localhome/htdocs/webissues-server/system/db/ System_Db_Mysqli_Engine->query('SELECT a.alert_...', Array)
#3 /localhome/htdocs/webissues-server/system/db/ System_Db_Connection->queryArgs('SELECT a.alert_...', Array)
#4 /localhome/htdocs/webissues-server/system/db/ System_Db_Connection->queryTableArgs('SELECT a.alert_...', Array)
#5 /localhome/htdocs/webissues-server/system/api/ System_Db_Connection->queryTable('SELECT a.alert_...', 2, 0, 3)
#6 /localhome/htdocs/webissues-server/cron/job.php(137): System_Api_AlertManager->getAlertsToEmail(true)
#7 /localhome/htdocs/webissues-server/cron/job.php(72): Cron_Job->sendNotificationEmails()
#8 /localhome/htdocs/webissues-server/system/core/ Cron_Job->execute()
#9 /localhome/htdocs/webissues-server/system/ System_Core_Application->run()
#10 /localhome/htdocs/webissues-server/cron/job.php(693): System_Bootstrap::run('Cron_Job')
#11 {main}

And we get errors when a user logs in who is not an admin user.

Unhandled System_Db_Exception: in /localhome/htdocs/webissues-server/system/db/mysqli/ on line 287
Stack trace:
#0 /localhome/htdocs/webissues-server/system/db/mysqli/ System_Db_Mysqli_Engine->handleError(Object(mysqli))
#1 /localhome/htdocs/webissues-server/system/db/mysqli/ System_Db_Mysqli_Engine->executeStatement('SELECT COUNT(*)...', Array)
#2 /localhome/htdocs/webissues-server/system/db/ System_Db_Mysqli_Engine->query('SELECT COUNT(*)...', Array)
#3 /localhome/htdocs/webissues-server/system/db/ System_Db_Connection->queryArgs('SELECT COUNT(*)...', Array)
#4 /localhome/htdocs/webissues-server/system/db/ System_Db_Connection->queryScalarArgs('SELECT COUNT(*)...', Array)
#5 /localhome/htdocs/webissues-server/system/api/ System_Db_Connection->queryScalar('SELECT COUNT(*)...', 2, 2)
#6 /localhome/htdocs/webissues-server/client/ System_Api_ProjectManager->getProjectsCount()
#7 /localhome/htdocs/webissues-server/system/web/ Client_ProjectsTree->execute()
#8 /localhome/htdocs/webissues-server/system/web/ System_Web_Component->run()
#9 /localhome/htdocs/webissues-server/client/index.html.php(22): System_Web_View->insertComponent('Client_Projects...')
#10 /localhome/htdocs/webissues-server/system/web/ include('/localhome/htdo...')
#11 /localhome/htdocs/webissues-server/system/web/ System_Web_View->executeTemplate()
#12 /localhome/htdocs/webissues-server/system/web/ System_Web_View->render()
#13 /localhome/htdocs/webissues-server/system/web/ System_Web_Component->run()
#14 /localhome/htdocs/webissues-server/system/core/ System_Web_Application->execute()
#15 /localhome/htdocs/webissues-server/system/ System_Core_Application->run()
#16 /localhome/htdocs/webissues-server/client/index.php(61): System_Bootstrap::run('Common_Applicat...', 'Client_Index')
#17 {main}

Where could be the problem?

Thank you for support...


I suspect that it's the well known "Prepared statement needs to be re-prepared" problem. It can be fixed by changing the configuration of MySQL or by upgrading to the latest version of WebIssues, where this problem no longer occurs.


configuration of MySQL is as follows

max_connect_errors = 100
open_files_limit = 16484
max_allowed_packet = 512M
read_buffer_size = 256K
read_rnd_buffer_size = 512K
innodb_log_file_size = 2GB

Shoud we increase table_open_cache and table_definition_cache?

How can we get a more detailed error message (log level, trace level) ?

Best regards


You can try, but it already seems quite large. I just found another potential source of the problem - when you moved the database to a new server, the owner of the effective_right view could be restored incorrectly - see this thread in the forum.


Thanks for the helpful tip. That was exactly the problem. We changed the DEFINER in the view effective_right and SQL SECURITY to INVOKER. After that, no more error messages came and the cron job now works without errors.

Best regards


But we have now found one problem after all. The event log contains the following message

PHP Warning: count(): Parameter must be an array or an object that implements Countable in /localhome/htdocs/webissues-server/system/api/ on line 693

What can we do to fix the problem?

Best Regards


It’s a known bug in version 1.1.5. You can upgrade to version 2.0 or just fix one line of code as described here.



Thanks for the info. We have fixed the one line and will plan the upgrade soon.

Our system administrator now has enabled selinux for the server.

We get an error message when uploading files as task attachments.

Is there any guidance for webissues on what to set for selinux?

What else could be the problem?

The error message does not say what the problem is but only that there is a problem. How can we create a more meaningful error message.

Best Regards,