Project

General

Profile

Actions

Defect #8740

closed

Mysql Out of Memory for query on DB with just 31 issues

Added by Guillermo Ramhorst almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
-
Start date:
2011-07-03
Due date:
% Done:

100%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi, for some reason, a very small setup consisting on 31 issues total, less than 10 users and also less than 10 projects, ends up generating this SQL that on a shared hosting account runs out of memory.

This is the offeinding SQL:

SELECT count(DISTINCT `issues`.id) AS count_all, tracker_id AS tracker_id FROM `issues` LEFT OUTER JOIN `projects` ON `projects`.id = `issues`.project_id LEFT OUTER JOIN `issue_statuses` ON `issue_statuses`.id = `issues`.status_id LEFT OUTER JOIN `trackers` ON `trackers`.id = `issues`.tracker_id WHERE (((projects.id = 5 OR (projects.lft > 7 AND projects.rgt < 8))) AND issue_statuses.is_closed=0) AND (projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) GROUP BY tracker_id

The full DB size is 2.3Mb. I am woking with latest redmine stable 1.1.3. I tested on an old redmine 0.8 release and it works ok.

I would appreciate insights as if this is something normal as it sounds weird that on a production shared hosting account, that tollerates much more complex databases is unable to handle this query, redmine is not viable, as it has very low activity and data volume.

Feel free to ask any other supporting data as you find appropriate.

Hosting company is Hostgator if you ask.

Best regards,
Willie

Actions #1

Updated by Etienne Massip almost 14 years ago

  • Category set to Database

This query is pretty common and should not consume that much memory space, did you try to execute with MySQL client ?

Actions #2

Updated by Guillermo Ramhorst almost 14 years ago

  • Status changed from New to Resolved
  • Assignee set to Guillermo Ramhorst
  • % Done changed from 0 to 100

Hi, it ended up being an issue with the web server environment and the mysql server, not even settings related.

Sorry for the hassle.

Best regards,
Willie

Actions #3

Updated by Jean-Philippe Lang almost 14 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Thanks for the feedback.

Actions

Also available in: Atom PDF