One of our Bahmni instances was not able to trigger any Bahmni Reports because - somehow - a report that could never be completed was stuck as 'Processing'. That piece of information could be seen in the 'Reports Queue' under 'My Reports':
It was clear that this report was not really processing and that the information was lingering, yet blocking the scheduling of any new report with an error 500:
The server encountered an internal error that prevented it from fulfilling this request.
Restarting Bahmni Reports didn't do anything to it:
sudo service bahmni-reports restart
The first question was then to figure out where this information is stored. Looking at the repository gave some clues by looking at this Liquibase changeset file. The first table that this file refers to is the scheduled_report table. Let's look into it.
Bahmni Reports maintains its own database 'bahmni_reports', see here.
Looking into that table indeed showed what looked like the one 'Processing'-marked line:
mysql -u root -p bahmni_reports
mysql> SELECT status, name FROM scheduled_report;
+------------+------------------------+
| status | name |
+------------+------------------------+
| Processing | Total Chief Complaints |
+------------+------------------------+
1 row in set (0.00 sec)
(Note that 'password' is the default Bahmni's MySQL password if you haven't changed it yet.)
It was removed manually:
mysql> DELETE FROM scheduled_report WHERE status='Processing';
That was it, there was no more lingering reports and new reports could be run again.
Ref: Unlocking a hanging Bahmni report marked as 'Processing'