Forums | Mahara Community

Support /
Prolem with Institution Statistics page with postgres error


Bei Chapman's profile picture
Posts: 8

08 May 2018, 5:41

Our Mahara is running 16.10.4 with Postgres 9.4.

When I go to Institution Statistics page, I got the following postgres error:

=================================

[WAR] 26 (lib/errors.php:860) Failed to get a recordset: postgres8 error: [-1: ERROR:  bind message supplies 17920 parameters, but prepared statement "" requires 214528] in EXECUTE("
                SELECT (0.0 + COUNT(id)) / NULLIF(COUNT(DISTINCT "owner"), 0)
                FROM "view"
                WHERE id IN (?,?,?,?,?,?,....
            ")
Command was:
                SELECT (0.0 + COUNT(id)) / NULLIF(COUNT(DISTINCT "owner"), 0)
                FROM "view"
                WHERE id IN (?,?,?,?,?,.....
            and values was (0:202094,1:81339,2:218132,3:103294,4:121499,5:197414,6:164444,7:188931,...)

=================================

I don't have any issue with Site Statistics page though.

Any suggested solutions?

Many thanks,

Bei

Robert Lyon's profile picture
Posts: 757

08 May 2018, 8:36

Hi Bei,

The error you show contains SQL for the old way we did the Institution statistics query.

This way was brittle and not scalable.

There was a patch made to fix this problem and make it more robust

https://reviews.mahara.org/#/c/7346/2

This was added for 17.04, but you could try backporting it to your version as the changes should be compatible

Cheers

Robert

2 results