Activity queue: unserialize(): Error at offset 65535 of 65535 bytes

Bug #1513851 reported by Jean-Philippe Gaudreau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

We frequently have this error coming from the cron :
-----------------------------------------------------------------------------------------------------------
[INF] 78 (lib/cron.php:30) ---------- cron running Thu, 10 Sep 2015 17:50:01 -0400 ----------
[INF] 78 (lib/cron.php:75) Running PluginSearchElasticsearch::cron
[INF] 78 (lib/cron.php:137) Running core cron activity_process_queue
[DBG] 78 (lib/activity.php:209) Page avec l'identifiant 18121 introuvable
[WAR] 78 (lib/activity.php:195) unserialize(): Error at offset 65535 of 65535 bytes
Call stack (most recent first):
  * log_message("unserialize(): Error at offset 65535 of 65535 byte...", 8, true, true, "/app/apache2/htdocs/mahara/lib/activity.php", 195) a
t /app/apache2/htdocs/mahara/lib/errors.php:439
  * error(8, "unserialize(): Error at offset 65535 of 65535 byte...", "/app/apache2/htdocs/mahara/lib/activity.php", 195, array(size 7)) at U
nknown:0
  * unserialize("O:8:"stdClass":3:{s:4:"view";s:4:"8011";s:8:"oldus...") at /app/apache2/htdocs/mahara/lib/activity.php:195
  * activity_process_queue() at /app/apache2/htdocs/mahara/lib/cron.php:142

[DBG] 78 (lib/activity.php:209) Le paramètre requis view n'a pas été renseigné pour le type d'activité viewaccess
[INF] 78 (lib/cron.php:137) Running core cron import_process_queue
[INF] 78 (lib/cron.php:137) Running core cron user_login_tries_to_zero
[INF] 78 (lib/cron.php:137) Running core cron check_imap_for_bounces
[INF] 78 (lib/cron.php:137) Running core cron watchlist_process_notifications
[INF] 78 (lib/cron.php:137) Running core cron export_process_queue
[INF] 78 (lib/cron.php:168) ---------- cron finished Thu, 10 Sep 2015 17:50:01 -0400 ----------
-----------------------------------------------------------------------------------------------------------

It's the same problem/resolution as in this task : https://bugs.launchpad.net/mahara/+bug/1474659

Tags: mysql
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5667

description: updated
Robert Lyon (robertl-9)
Changed in mahara:
status: New → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5667
Committed: https://git.mahara.org/mahara/mahara/commit/fcbb3ad103a7b5268bfcd04b34ae3df7f93e4b75
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit fcbb3ad103a7b5268bfcd04b34ae3df7f93e4b75
Author: Jean-Philippe Gaudreau <email address hidden>
Date: Fri Nov 6 10:32:28 2015 -0500

Increase the size of the activity queue data column (Bug 1513851)

In MySQL, the default "text" column size is 65kB. Because this column
can hold the serialized text from several other columns, it needs to
be larger than that. Setting it to "big" generates a "longtext", which
is 4GB.

This change has no effect in Postgres. Postgres has only one text
size (unlimited). The XMLDB generator is smart enough that it
recognizes this and doesn't run any SQL in this case.

behatnotneeded

Change-Id: I0311bf9d25dba531ced72e6f74b8d5b2d317e745

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
importance: Undecided → Medium
milestone: none → 16.04.0
Revision history for this message
Aaron Wells (u-aaronw) wrote :

As with https://bugs.launchpad.net/mahara/+bug/1474659, because this is a database change and it's not "high" priority, we won't backport the fix into the stable branches.

For existing Mahara sites (15.10 and earlier) that are affected by this problem, probably the easiest thing to do is to manually change the column using a MySQL "ALTER TABLE" query:

 ALTER TABLE activity_queue MODIFY COLUMN data LONGTEXT NOT NULL;

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Thanks for the patch, Jean-Philippe!

Since this is the second bug of this sort that we've encountered, I've opened an additional bug item to try to get ahead of this and track down any other column that may be affected: Bug 1514273

Cheers,
Aaron

tags: added: mysql
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/6058

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.