Project

General

Profile

Multiple NoMethodError errors after upgrade

Added by Aleksander Stukov about 8 years ago

Hi,
After migrating from redmine 2.3.1 and Rails 2.2.1, users are reporting random 500-Internal Server errors. Checking production log, we see several errors like this one:

NoMethodError (undefined method `shared_versions' for nil:NilClass):
app/models/issue.rb:753:in `assignable_versions'
app/models/issue.rb:597:in `validate_issue'
app/controllers/issues_controller.rb:286:in `block in bulk_update'
app/controllers/issues_controller.rb:273:in `each'
app/controllers/issues_controller.rb:273:in `bulk_update'

Undefined method is not always the same one, and there is no clear pattern on how to reproduce the error - users usually retry the same action and it happens with no further errors.

Other undefined methods:

  • find_new_statuses_allowed_to
  • first
  • name

Apart from this, searching on redmine is not behaving correctly. When you search any topic it returns correct results, but navigating using the "Next" and "Previous" buttons messes up navigation and user is no longer able to return to the previous page, and the before-first-page still shows "Previous" button.

Current server configuration (Windows 2012 Server 64Bits):

Environment:
Redmine version 2.6.9.stable
Ruby version 2.1.5-p273 (2014-11-13) [i386-mingw32]
Rails version 3.2.22
Environment production
Database adapter SQLServer
SCM:
Subversion 1.9.3
Filesystem
Redmine plugins:
no plugin installed

Any ideas?

Best regards.


Replies (4)

RE: Multiple NoMethodError errors after upgrade - Added by Aleksander Stukov about 8 years ago

Update:

Searches work fine after upgrading to Redmine 3.2.0 and SQL Server 2014. Prior upgrading we did some tests with both MariaDB and PostgreSQL, Redmine 2.6.9 and error did not reproduced, so I guess it has something to do with SQL Server and 2.x versions of Redmine. Or some problem with SQL Server 2008R2 in particular and redmine 2.x.

NoMethodError is under test using Redmine 3.2.0, so far its dissapeared, fingers crossed.

RE: Multiple NoMethodError errors after upgrade - Added by Aleksander Stukov about 8 years ago

Update:
NoMethodError appeared again randomly after production installation upgrade. Current settings:

Environment:
Redmine version 3.2.0.stable
Ruby version 2.1.5-p273 (2014-11-13) [i386-mingw32]
Rails version 4.2.5
Environment production
Database adapter SQLServer
SCM:
Subversion 1.9.3
Filesystem
Redmine plugins:
no plugin installed

This is desperating, we have tried several configurations, run many tests, but as soon as we have multiple requests from our users, redmine seems to fail from time to time. The most annoying thing is that users refresh the page and the work is there, it seems that redmine works at first and fails at the end of the process.

Nobody seems to have any clue about this, we really feel on our own. I have programmed a tool to move SQL Server data to PostgreSQL or MariaDB and we have three separate installations with the same database with different database backends, and all seem to work fine with our tests. As error is random, its almost impossible to tell if some specific configuration will work on production premises. All the installation rely on the very same operating system and Rails installation, as they are all virtual machines cloned from the failing one.

I would kick SQL Server or Windows if I know that this would solve the problem, but as I can't tell, it's more likely that we will end moving to either TFS or Jira.

Anyway, should I find the solution, I will post it here.

RE: Multiple NoMethodError errors after upgrade - Added by Aleksander Stukov about 8 years ago

This might not be definitive, but after a whole day there has been no errors at all, flawlessly, and there has been a lot of traffic today. What have we changed?. We have changed email delivery from async_smtp to smtp.

It might make some sense as under testing environment we don't have smtp server configured and redmine always works there. Yet is nonsense that email delivery failures make the whole application to crash.

RE: Multiple NoMethodError errors after upgrade - Added by Aleksander Stukov about 8 years ago

It is confirmed, errors have dissapeared. It is also pretty clear that multithreaded support under Windows is poorly implemented, so I would not recommed using Redmine under Windows environment for medium-sized installations (20GB Installation for 50 users + 10K issues a year + 50 SVN Repositories + 2GB attachments).

    (1-4/4)