Defect #8143

Problem to update subtask

Added by Rogério Carrasqueira about 11 years ago. Updated about 7 years ago.

Status:ClosedStart date:2011-04-13
Priority:UrgentDue date:
Assignee:-% Done:


Target version:-
Resolution:Cant reproduce Affected version:1.1.2



I'm having some problem to update a subtask that belongs to a task with many substask. The stacktrace was describe below.

Processing IssuesController#update (for at 2011-04-13 16:48:32) [PUT]
  Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Enviar", "notes"=>"", "action"=>"update", "_method"=>"put", "authenticity_token"=>"wInylpGqcE/pg22rB3Ta0KXYLXNPz8YXJuecCXGszfM=", "id"=>"127", "issue"=>{"parent_issue_id"=>"118", "lock_version"=>"64", "fixed_version_id"=>"1", "assigned_to_id"=>"3", "subject"=>"Integração com AdServers (MediaMind)", "category_id"=>"2", "tracker_id"=>"2", "status_id"=>"1", "description"=>"Neste módulo será realizada a integração entre o sistema e o AdServer MediaMind, possibilitando a programação de campanhas, o envio de criativos e a obtenção de informações de performance das campanhas."}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}

ActiveRecord::StatementInvalid (Mysql::Error: Lock wait timeout exceeded; try restarting transaction:               UPDATE `issues`
              SET `lock_version` = 65, `updated_on` = '2011-04-13 16:48:33'
              WHERE id = 127
              AND `lock_version` = 64
  app/models/issue.rb:554:in `save_issue_with_child_records'
  app/models/issue.rb:536:in `save_issue_with_child_records'
  app/controllers/issues_controller.rb:170:in `update'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /vol/home/redmine/production/web_app/redmine-1.1.2/public/500.html (500 Internal Server Error)
About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Edge Rails revision       unknown
Application root          /vol/home/redmine/production/web_app/redmine-1.1.2
Environment               production
Database adapter          mysql
Database schema version   20101114115359

About your Redmine plugins
Redmine Charts            0.1.0
Redmine Wysiwyg Textile   0.14
Advanced reminder         0.0.1

Related issues

Related to Redmine - Defect #7002: mysql timeout when first browsing a large git repository Closed 2010-11-30
Related to Redmine - Defect #5683: Project copy Lock wait timeout New 2010-06-14
Related to Redmine - Defect #6579: Tree hierachy being currupted on multiple submissions of ... Closed 2010-10-05


#1 Updated by Jean-Baptiste Barth about 11 years ago

Can we have more informations on your setup before we try to reproduce this bug ? I'd be particularly interested in your Mysql server version, the way you store data (MyISAM or InnoDB ?), and the approximate number of subtasks you have on this parent issue.

#2 Updated by Jean-Baptiste Barth almost 11 years ago

  • Status changed from New to Closed
  • Resolution set to Cant reproduce

Closing as a stale issue. Please re-open if you have the same problem and can tell us a way to reproduce, because I have not been able to with a new setup...

#3 Updated by @ go2null about 7 years ago

Related to Defect #1931 Timeout risks: need asynchronous operations. and Defect #11678 MySQL locks and Redmine collapsing.

I am also having the same issue - it occurs with large parent-child hierarchies and the consequent cascading updates of status, priority and other checks.

  Redmine version                2.6.0.stable
  Ruby version                   1.9.3-p484 (2013-11-22) [x86_64-linux]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2

#4 Updated by Toshi MARUYAMA about 7 years ago

@ go2null wrote:

it occurs with large parent-child hierarchies

This is fixed by #6579 on 3.0.0.
But there are new problems of MySQL 5.6 and 5.7 (#17460, #19344).

#5 Updated by Toshi MARUYAMA about 7 years ago

  • Related to Defect #6579: Tree hierachy being currupted on multiple submissions of an issue added

Also available in: Atom PDF