Project

General

Profile

Redmine is getting stuck when entering to the Custom Fields admin page

Added by Yazan Televes 21 days ago

Dear comunity,

First of all thank you for your effort developing and maintaining redmine. We had recently updated from 4.0.0 to 5.0.0 then to 5.1.2(last), and everything is fine, but the only issue we faced (in 5.0.0, and 5.1.2) is that the custome Field page gets stuck every time you enter to it and stop reacting, then the browser begin giving a messages asking for waiting or for leaving and closing the page (as you can see in the capture below). Yes, We have a big number of custome fields but even with this same number, issue was not happening in 4.0.0 version. What I tried was to remove the 80% of the custome fields in database and the issue disappeared (at least one of the causes is clearly the number of C.Fields). My question is if you can indicate please where do you thing I have to modify in code or in configuration to solve the issue? I mean, if with the new versions there is any timeout or memory restrictions or limits that are forcing the browser to give the message so we can increase the timeout or memory size? or at least if there is any log files that we can check apart of the nginx/passenger webserver access.log and error.log files where we didne find any indication of errors. Is there another place to look for logs? Thanks a lot. The following is our server configuration:

Passenger installation is the one of is ubuntu 18.04 Bionic with apt-get with the nginx integration module (not using passsenger Gem)
mysql 5.7

Environment: (Production)
Redmine version 5.1.2.stable (Issue happened with 5.0.0 also)
Ruby version 3.1.0-p0 (2021-12-25) [x86_64-linux]
Rails version 6.1.7.7
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
Redmine settings:
Redmine theme Arantia_tree_view (includes JavaScript)
SCM:
Subversion 1.9.7
Git 2.17.1
Filesystem
Redmine plugins:
no plugin installed


Replies (7)

RE: Redmine is getting stuck when entering to the Custom Fields admin page - Added by Marius BĂLTEANU 21 days ago

I will to reproduce your issue, but I would like to know before how many custom fields do you have when the issue reproduces. Also, can you give it a try with the standard theme as well?

RE: Redmine is getting stuck when entering to the Custom Fields admin page - Added by Yazan Televes 16 days ago

Thank you Marius for the replay. We have the issue with the standard theme also. Regarding the number of the custom fields, I didnt make really many tests to see at which number exactly the issue begin appearing, it may be a good test that I will perform shortly. By the way, the total number of custom fields is 1927.

RE: Redmine is getting stuck when entering to the Custom Fields admin page - Added by Yazan Televes 14 days ago

I tried the mentioned test above ("the reducing of the number of custom fields to know at witch value the issue begin appearing"), and the result is that it is proportional, I mean:
- Reducing from 2000 to 1000 the issue still there (and the browser wait/abort message also appears) but the waiting time is now 30% approximatly.
- Reducing from 1000 to 500 the waiting time is about 10 seconds and now the message of browser is not appearing. Only the page freeze till passing the waiting time.
- With only 250 custome fields, there is no issue.

RE: Redmine is getting stuck when entering to the Custom Fields admin page - Added by Yazan Televes 14 days ago

In case it helps, I attached 2 captures(both basic theme and our theme) of the appeareance of the page in the position where the custom fields stop loading.

RE: Redmine is getting stuck when entering to the Custom Fields admin page - Added by Yazan Televes 13 days ago

Another option that may work (but I couldnt perform since I have no expirience in Ruby at all), is to implement a plugin (only in view level, no model creating neither migrations) is to split them in a 200 or 100 custom fields by page, having the pages index in the bottom of the page. The place to do that must be in "app/views/custom_fields/_index.html.erb", trying to avoid loading everything at once and stuck. Any idea about how to modify the file?

<table class="list custom_fields">
<thead><tr>
<th><%=l(:field_name)%></th>
<th><%=l(:field_field_format)%></th>
<th><%=l(:field_is_required)%></th>
<% if tab[:name] == 'IssueCustomField' >
<th><
=l(:field_is_for_all)%></th>
<th><%=l(:label_used_by)%></th>
<% end >
<th></th>
</tr></thead>
<tbody>
<
(@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| ->
<
back_url = custom_fields_path(:tab => tab[:name]) >
<tr>
<td class="name"><
= link_to custom_field.name, edit_custom_field_path(custom_field) ></td>
<td><
= l(custom_field.format.label) ></td>
<td><
= checked_image custom_field.is_required? ></td>
<
if tab[:name] == 'IssueCustomField' >
<td><
= checked_image custom_field.is_for_all? ></td>
<td><
= l(:label_x_projects, :count => @custom_fields_projects_count[custom_field.id] || 0) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? $
<% end >
<td class="buttons">
<
= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') >
<
= link_to_function l(:button_copy), "location.href = '#{new_custom_field_path(:copy => custom_field)}&type=' + encodeURIComponent(($('.tabs a.selected').attr$
<%= delete_link custom_field_path(custom_field) >
</td>
</tr>
<
end %>
</tbody>
</table>

RE: Redmine is getting stuck when entering to the Custom Fields admin page - Added by Marius BĂLTEANU 13 days ago

Yes, this is what we should do. Can you open a new feature request for this, please?

RE: Redmine is getting stuck when entering to the Custom Fields admin page - Added by Yazan Televes 13 days ago

Feature requestcreated: https://www.redmine.org/issues/40699
Anyway, if someone could averiguate the source of the issue and can help we appereciate a lot, since feature result may take a time.
Thank you for your effort and support.

    (1-7/7)