Project

General

Profile

Actions

Defect #8654

closed

Mysql::Error: MySQL server has gone away

Added by Cassiano Monteiro almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2011-06-21
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Suddenly I can't update old issues on my Redmine installation. Everytime I try, I get redmine 500 error. On the log, I got this:

ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone away: SELECT * FROM `issue_statuses` WHERE (`issue_statuses`.`id` = 0) ):
  app/models/issue.rb:102:in `after_initialize'
  app/models/issue.rb:351:in `init_journal'
  app/models/issue.rb:841:in `create_journal'
  app/models/issue.rb:553:in `save_issue_with_child_records'
  app/models/issue.rb:535:in `save_issue_with_child_records'
  app/controllers/issues_controller.rb:170:in `update'
  passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
  passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in `safe_fork'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
  passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
  passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application'
  passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application'
  passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:145:in `spawn_application'
  passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /home/storage/9/12/08/proprietariodireto/rails_apps/redmine/public/500.html (500 Internal Server Error)

Processing IssuesController#update (for 201.74.132.152 at 2011-06-20 21:55:12) [PUT]
  Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Submit", "notes"=>"Passado o Kaizen.", "action"=>"update", "_method"=>"put", "authenticity_token"=>"/GSQMZigMjNsiWN0HM0Th7vQr+pA2SkmjGtZW6L21UQ=", "id"=>"23", "issue"=>{"start_date"=>"2011-06-13", "estimated_hours"=>"", "priority_id"=>"4", "parent_issue_id"=>"", "lock_version"=>"0", "done_ratio"=>"0", "assigned_to_id"=>"4", "subject"=>"Kaizen Wladimir", "tracker_id"=>"4", "due_date"=>"2011-06-17", "status_id"=>"5", "description"=>"Wladimir estarĂ¡ ocupado com o Kaizen."}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}

Running on Linux with mySQL server. Strange thing is that mySQL server is up and running fine, and I can do anything else on Redmine except updating old issues (I can even create and update new ones). WTF??

On the error, it says:

SELECT * FROM `issue_statuses` WHERE (`issue_statuses`.`id` = 0

but there are no status with id=0. And I didn't change the default statuses, it was working fine and suddenly I can't update old issues anymore. Can someone take a look at it?

Actions #1

Updated by Jean-Baptiste Barth almost 13 years ago

Can you read SubmittingBugs and tell us your precise setup ? Also, I'd like to see the complete trace, i.e. see the HTTP request above the ruby error (to see what urls have been called, which parameters, etc.)

Actions #2

Updated by Cassiano Monteiro almost 13 years ago

Well, I thought this log would make it... In fact that's all I have. On the Apache log, i got this:

201.74.132.152 - - [20/Jun/2011:21:55:12 -0300] "POST /issues/23 HTTP/1.1" 500 576 "http://redmine.proprietariodireto.com/issues/23" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20100101 Firefox/5.0" 

I can also give you my GEM LIST...

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
daemon_controller (0.2.6)
fastthread (1.0.7)
i18n (0.4.2)
mysql (2.8.1)
passenger (3.0.7)
rack (1.3.0, 1.0.1)
rails (2.3.5)
rake (0.9.0, 0.8.7)
sinatra (1.2.6)
sqlite3 (1.3.3)
tilt (1.3)

Strange fact: after 2 days having this error, now it's working fine again...

Running Redmine 1.1.3 with redmine_charts plugin.

What else can help?

Actions #3

Updated by Etienne Massip almost 13 years ago

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

I'll close it since it looks like a DB issue but feel free to reopen it if this happens again.

Actions #4

Updated by Cassiano Monteiro almost 13 years ago

As I told, the DB was looking fine. I was able to perform any other inputs on Redmine, like wiki, documents, and even creating/updating new issues. That particular issue was giving the error.

Anyways, I if get this error againg, I will try to find better information.

Actions #5

Updated by Etienne Massip almost 13 years ago

Check if you have a record in your issues table for which status_id = 0.

Also check your issue_statuses table to check if there is a status with is_default set to true/1.

Actions #6

Updated by Cassiano Monteiro almost 13 years ago

No issues with status_id=0.

This is my issue_statuses table. I haven't touched it from the Redmine defaults.

id  name         is_closed        is_default        position        default_done_ratio
1   New          0                1                 1               NULL
2   In Progress  0                0                 2               NULL
3   Resolved     0                0                 3               NULL
4   Feedback     0                0                 4               NULL
5   Closed       1                0                 5               NULL
6   Rejected     1                0                 6               NULL
Actions

Also available in: Atom PDF