Ticket #1211 (closed Bug: wontfix)

Opened 6 months ago

Last modified 5 months ago

MySQL: catching storage engine errors

Reported by: vipsoft Owned by: vipsoft
Priority: low Milestone: Features requests - after Piwik 1.0
Component: Core Keywords: outofscope
Cc: Sensitive: no

Description (last modified by vipsoft) (diff)

When an SQL query fails due to a storage engine error, it doesn't return an (expected) SQLSTATE error, e.g., 42S01. Instead, we get an internal errno, e.g.,

Mysqli statement execute error : Got error 28 from storage engine

where 28 is often defined in errno.h as ENOSPC, i.e., no disk space left on volume.

Can we catch errors like this and provide a more user-friendly error message to users (via php's posix_strerror() function, if available)?

Note: in the case of ENOSPC, this wouldn't necessarily be limited to INSERTs. SELECTs (e.g., JOINs) and disk-based temporary tables could also be the trigger.

Note: it looks like -1 (though not a defined errno) is also a possible "errno" that could be returned.

Change History

Changed 6 months ago by vipsoft

  • description modified (diff)

Changed 6 months ago by vipsoft

  • description modified (diff)

Changed 6 months ago by vipsoft

  • keywords defer added
  • status changed from new to closed
  • resolution set to wontfix
  • description modified (diff)

I'm going to mark this as a wontfix for now. Proactive system monitoring falls within the sysadmin's scope of responsibilities, especially in a shared hosting (shared resources) environment.

At present, we generally don't try to catch errors on INSERT/UPDATE/SELECT queries. Implication: big patch, small benefit (warning) for a rare occurrence, requires user to check the Piwik dashboard (meanwhile other applications could be failing)

If a storage engine error occurs while the tracker executes, it could go undetected for a while. Implication: lost tracking, pain point

Changed 6 months ago by vipsoft

  • keywords defer removed

Changed 6 months ago by vipsoft

  • milestone changed from 1 - Piwik 0.6 to Features requests - after Piwik 1.0

Changed 5 months ago by vipsoft

  • keywords outofscope added

Changed 5 months ago by vipsoft

Running out of disk space is also an issue for disk-based session files. This would be visible to someone using the UI.

Note: See TracTickets for help on using tickets.