institution data daily cron failing

Bug #1308792 reported by Robert Lyon on 2014-04-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Low
Robert Lyon

Bug Description

It looks like the cron_institution_data_daily may be failing to create the pie graph due to the sql IN statement needing to deal with a too large sql statement. On mahara.org it tries to create a sql statement with an IN clause containing 46000+ ids.

There should be a better way of handling this rather than doing such a great big sql statement.

Robert Lyon (robertl-9) wrote :

Ah ha: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /var/www/mahara-org-staging-mahara/releases/20140417001344/htdocs/lib/adodb/adodb-exceptions.inc.php on line 78

So yeah, trying to deal with 46000+ users to make the piegraph seems to freak things out.

Robert Lyon (robertl-9) on 2014-04-22
Changed in mahara:
status: New → In Progress
assignee: nobody → Robert Lyon (robertl-9)

Reviewed: https://reviews.mahara.org/3269
Committed: http://gitorious.org/mahara/mahara/commit/02a60fb4cbb01c9c8dc6670bb54780226726e768
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 02a60fb4cbb01c9c8dc6670bb54780226726e768
Author: Robert Lyon <email address hidden>
Date: Tue Apr 22 12:07:36 2014 +1200

Problem with oversized sql IN() clause (Bug #1308792)

Currently institution data daily cronjob fails if the number of items
wanted to be prepared for the IN() clause exceeds 46,000. This causes
adodb to hit memory limit and fail out.

Have taken the three sql commands from various places that make up the
call and made them nested to avoid overly long prepared statement.

Change-Id: I5e38c01194f7b2c3f3899c1573a69411ac273c18
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 1.10.0
Aaron Wells (u-aaronw) on 2014-10-21
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers