Defect #1569

500 Internal error for some journal entries

Added by Vladymyr Vladymyrov over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:2008-07-03
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Projects
Target version:-
Resolution: Affected version:0.7.1

Description

I'm using the following configuration with redmine-0.7.1:

$ruby script/about
About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.1.1
Rails version             2.0.2
Active Record version     2.0.2
Action Pack version       2.0.2
Active Resource version   2.0.2
Action Mailer version     2.0.2
Active Support version    2.0.2
Edge Rails revision       rel_2-0-2
Application root          .../redmine-0.7.1-dev/redmine-0.7.1
Environment               development
Database adapter          mysql
Database schema version   92

And I receive Internal error when I try to open some issues http://localhost:3000/issues/show/29:

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.

Back

When I open same page in development mode I resieve the following trace:

NoMethodError in Issues#show 

Showing issues/_history.rhtml where line #11 raised: 
undefined method `length' for #<Enumerable::Enumerator:0xb671d9f8>

Extracted source (around line #11): 
8:        <li><%= show_detail(detail) %></li>
9:     <% end %>
10:     </ul>
11:     <%= render_notes(journal) unless journal.notes.blank? %>
12:     </div>
13: <% end %>

Trace of template inclusion: /issues/show.rhtml

RAILS_ROOT: /home/vvlad/redmine/redmine-0.7.1-dev/redmine-0.7.1
Application Trace | Framework Trace | Full Trace 
vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb:50:in `truncate'
app/helpers/application_helper.rb:313:in `textilizable'
app/helpers/application_helper.rb:296:in `gsub'
app/helpers/application_helper.rb:296:in `textilizable'
app/helpers/journals_helper.rb:29:in `render_notes'
app/views/issues/_history.rhtml:11:in `_run_erb_47app47views47issues47_history46rhtml'
app/views/issues/_history.rhtml:1:in `each'
app/views/issues/_history.rhtml:1:in `_run_erb_47app47views47issues47_history46rhtml'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `send'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `compile_and_render_template'
vendor/rails/actionpack/lib/action_view/base.rb:365:in `render_template'
vendor/rails/actionpack/lib/action_view/base.rb:316:in `render_file'
vendor/rails/actionpack/lib/action_view/base.rb:331:in `render'
vendor/rails/actionpack/lib/action_view/partials.rb:117:in `render_partial'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:26:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:26:in `benchmark'
vendor/rails/actionpack/lib/action_view/partials.rb:116:in `render_partial'
vendor/rails/actionpack/lib/action_view/base.rb:352:in `render'
app/views/issues/show.rhtml:87:in `_run_erb_47app47views47issues47show46rhtml'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `send'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `compile_and_render_template'
vendor/rails/actionpack/lib/action_view/base.rb:365:in `render_template'
vendor/rails/actionpack/lib/action_view/base.rb:316:in `render_file'
vendor/rails/actionpack/lib/action_controller/base.rb:1100:in `render_for_file'
vendor/rails/actionpack/lib/action_controller/base.rb:861:in `render_with_no_layout'
vendor/rails/actionpack/lib/action_controller/layout.rb:262:in `render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/issues_controller.rb:106:in `show'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:131:in `call'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:131:in `custom'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:156:in `call'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:156:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:150:in `each'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:150:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:107:in `respond_to'
app/controllers/issues_controller.rb:105:in `show'
vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `send'
vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `perform_action_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:697:in `call_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `perform_action'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/lib/ruby/1.8/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/1.8/mongrel/rails.rb:74:in `synchronize'
/usr/lib/ruby/1.8/mongrel/rails.rb:74:in `process'
/usr/lib/ruby/1.8/mongrel.rb:159:in `process_client'
/usr/lib/ruby/1.8/mongrel.rb:158:in `each'
/usr/lib/ruby/1.8/mongrel.rb:158:in `process_client'
/usr/lib/ruby/1.8/mongrel.rb:285:in `run'
/usr/lib/ruby/1.8/mongrel.rb:285:in `initialize'
/usr/lib/ruby/1.8/mongrel.rb:285:in `new'
/usr/lib/ruby/1.8/mongrel.rb:285:in `run'
/usr/lib/ruby/1.8/mongrel.rb:268:in `initialize'
/usr/lib/ruby/1.8/mongrel.rb:268:in `new'
/usr/lib/ruby/1.8/mongrel.rb:268:in `run'
/usr/lib/ruby/1.8/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/1.8/mongrel_rails:129:in `run'
/usr/lib/ruby/1.8/mongrel/command.rb:212:in `run'
/usr/lib/ruby/1.8/mongrel_rails:282
vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
vendor/rails/railties/lib/commands/servers/mongrel.rb:64
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/railties/lib/commands/server.rb:39
script/server:3:in `require'
script/server:3
Request

Parameters: 
{"id"=>"29"}

Show session dump
--- 
:user_id: 3
:query: 
  :project_id: 1
  :filters: 
    status_id: 
      :values: 
      - "" 
      :operator: o
:return_to_params: 
issuesindex_sort: 
  :key: issues.id
  :order: desc
flash: !map:ActionController::Flash::FlashHash {}

Response

Headers: 
{"Content-Type"=>"text/html",
 "cookie"=>[],
 "Cache-Control"=>"no-cache"}

I was able to locate and isolate problem - it is because the following text I submitted to the Notes field:
I tested this text in http://demo.redmine.com - http://demo.redmine.org/issues/show/840 - it works.

Also I've copied database to my windows desktop and tested it there - it works fine. But on my target web server (Linux localhost 2.6.24-1-686 #1 SMP Thu May 8 02:16:39 UTC 2008 i686 GNU/Linux) it fails with 500 error.

For now I solved this by removing text which makes crash the application.
Could you please suggest how I can fix this on my target web server server?


Related issues

Duplicates Redmine - Defect #1526: Problem activity. Closed 2008-06-25

History

#1 Updated by Vladymyr Vladymyrov over 9 years ago

Here is the text which crash the app:

Are you talking about inventory loading process or registration initial load? As far as I recall from February/March, the registration initial load used to take 6+ hours, with the load of objects that existed then. I had tuned some of the typical parameters that impact the registration process. I believe the changes were done on Production and not Test, I do not recall exactly if they were replicated. Those changes should be permanent, unless there was an upgrade to the system and the changes were not propagated. You can compare startup scripts and environment files under the scripts/startup directory under the Production and Test system to see the differences.

If its about the Inventory loading process itself then I am not very familiar with this process

As discussed compare the following params on Temm (Test and Production) under the following files under directory classic/scripts/startup. As I mentioned these really come into the picture with a DC restart, not so much with processing events generated by backend. You may also want to compare number of Data Processor instances on both machines etc.

File  run_pdpxslapp.sh
xsl.pdp.num_metric_loaders 
File containers.xml under PDP_Main_Manager settings
xsl.dc.topology_cache_size
xsl.dc.metrics_cache_size
File containers.xml under PDP_ServiceModelLayout
xsl.sml.cachesize
Change memory size parameter JAVA_DEFAULT_MAX_MEM under amf configuration for the startup files for PDP_Main_Manager and PDP_ServiceModelLayout
File start.md_processor.sh
parameters -Dxsl.pdp.processor.timeout=${XSL_PDP_TIMEOUT:-60} \
  -Dxsl.pdp.processor.pump_limit=${XSL_PDP_PUMP_LIMIT:--1} \

Issue #58 assigned to

#2 Updated by Thomas Lecavelier over 9 years ago

  • Status changed from New to Closed
  • Assignee deleted (Jean-Philippe Lang)
Ruby version              1.8.7 (i486-linux)

Duplicated of #1526, Redmine installation wiki page say that redmine is not ruby 1.8.7 compatible.

#3 Updated by Vladymyr Vladymyrov over 9 years ago

  • Assignee set to Jean-Philippe Lang

I discovered that the problem is in the following text part:

Issue #58 assigned to

Once I've changed it to the - page start working ok
Issue # 58 assigned to

Also available in: Atom PDF