Project

General

Profile

Redmine 1.4.2 - Internal error 500: MySQL server has gone away

Added by CM Gui almost 12 years ago

Hi All

We just upgraded from 1.1.3 to 1.4.2, and now gets an "Internal error" page when we go to the site. Refreshing the page seems to fix the problem. We had to refresh when going to the site the first time. When we hit the Login, we got the same Internal error page again and had to refresh again. After login, still the same error and had to refresh again. After that, no more error.

We are using Redmine with Thin web (instead of Webrick) and Nginx (for https).

NOTE - when we use the default Redmine webrick, i.e. ruby script/server webrick -e production, we have no problem. So the problem is with Thin and Redmine integration.

Thank you very much in anticipation...

Here are the error page and error log:
"Internal error. An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance. If you are the Redmine administrator, check your log files for details about the error."

Error log:
"
Processing WelcomeController#index (for 192.168.5.189 at 2012-05-28 12:45:34) [GET]
Parameters: {"controller"=>"welcome", "action"=>"index"}

ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone away: SHOW FIELDS FROM `settings`):
app/models/setting.rb:152:in `check_cache'
app/controllers/application_controller.rb:75:in `user_setup'
thin (1.3.1) lib/thin/connection.rb:80:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `send'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6
/usr/local/bin/thin:23:in `load'
/usr/local/bin/thin:23

Rendering /usr/local/www/redmine/public/500.html (500 Internal Server Error)"


Processing WelcomeController#index (for 192.168.5.189 at 2012-05-29 09:18:26) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 422ms (View: 344, DB: 68) | 200 OK [https://192.168.5.52/]

Processing AccountController#login (for 192.168.5.189 at 2012-05-29 09:18:35) [GET]
Parameters: {"controller"=>"account", "action"=>"login"}

ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone away: SHOW FIELDS FROM `settings`):
app/models/setting.rb:152:in `check_cache'
app/controllers/application_controller.rb:75:in `user_setup'
thin (1.3.1) lib/thin/connection.rb:80:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `send'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6
/usr/local/bin/thin:23:in `load'
/usr/local/bin/thin:23

Rendering /usr/local/www/redmine/public/500.html (500 Internal Server Error)

Processing AccountController#login (for 192.168.5.189 at 2012-05-29 09:21:20) [GET]
Parameters: {"controller"=>"account", "action"=>"login"}
Rendering template within layouts/base
Rendering account/login
Completed in 314ms (View: 237, DB: 24) | 200 OK [https://192.168.5.52/login]

Processing AccountController#login (for 192.168.5.189 at 2012-05-29 09:21:35) [POST]
Parameters: {"back_url"=>"https%3A%2F%2F192.168.5.52%2F", "authenticity_token"=>"QD6/zLfWxb7zRExFUgW21Y7cthK9Kad2rE9kaf40SEQ=", "controller"=>"account", "login"=>"Login »", "username"=>"cheemeng", "password"=>"[FILTERED]", "action"=>"login"}

ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone away: SHOW FIELDS FROM `settings`):
app/models/setting.rb:152:in `check_cache'
app/controllers/application_controller.rb:75:in `user_setup'
thin (1.3.1) lib/thin/connection.rb:80:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `send'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6
/usr/local/bin/thin:23:in `load'
/usr/local/bin/thin:23

Rendering /usr/local/www/redmine/public/500.html (500 Internal Server Error)
fxvmware002#


Replies (1)

RE: Redmine 1.4.2 - Internal error 500: MySQL server has gone away - Added by CM Gui almost 12 years ago

We added this line "reconnect; true" in database.yml and it seems to have fixed the problem, but it is still troubling why this problem occurred in the first place.

production:
...
...
reconnect: true

    (1-1/1)