Defect #34280

How to optimize or delete old logs? It takes 30 seconds for me to create an issure.

Added by li ru over 1 year ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Invalid Affected version:3.4.6

Description

For example, creating an issue, modifying the content of an issue... and so on, it seems that writing SQL actions takes a long time. About 30 seconds.

Our latest issure number has reached 32308.
The speed of redmine has been unusually slow in the last two weeks.

How can I find out where the problem is? And how to optimize it?
Or how to clear unwanted junk files?

Seniors with relevant experience, please help me, thank you.

螢幕擷取畫面 2020-11-18 112827.png (86.2 KB) li ru, 2020-11-18 04:28

History

#1 Updated by li ru over 1 year ago

This is the version I use.

Information
Redmine 3.4.6.stable

Default administrator account changed
Attachments directory writable
Plugin assets directory writable (./public/plugin_assets)
RMagick available (optional)
ImageMagick convert available (optional)

Environment:
Redmine version 3.4.6.stable
Ruby version 2.3.7-p456 (2018-03-28) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2
SCM:
Subversion 1.10.2
Git 2.19.1
Filesystem
Redmine plugins:
easy_gantt 1.12
redmine_agile 1.4.9
redmine_checklists 3.1.14
redmine_pivot_table 0.0.7

#3 Updated by Jacob Evans over 1 year ago

Hi,
That version of Redmine seems quite old so if possible maybe try and update it to the latest version.

Thanks

#4 Updated by li ru over 1 year ago

Is there any other way besides upgrading the new version? Because there are plug-ins that do not support the new version, and many people are using the system, it is not convenient to update.

The most feared is that the problem is not solved after the update.

Is there any other way to optimize or check the problem?

#5 Updated by Pavel Rosický over 1 year ago

you should use a more recent Redmine version in terms of performance and security. Redmine 3.4.6 is no longer supported. All plugins you have installed should work (or with a little effort), but they may need an upgrade aswell.

How can I find out where the problem is?
1/ I would recommend you to track slow DB queries. Find out why they're slow with EXPLAIN https://www.exoscale.com/syslog/explaining-mysql-queries/
2/ try it without plugins
3/ use a profiler like https://github.com/MiniProfiler/rack-mini-profiler (advanced)
4/ it could be something completely different, it's hard to guess why is Redmine slow on your own server without actually knowing anything specific.

Or how to clear unwanted junk files?
What do you mean by junk files?

https://docs.rackspace.com/support/how-to/understanding-logrotate-utility/ ?

#6 Updated by li ru over 1 year ago

Or how to clear unwanted junk files?
What do you mean by junk files?

==============================================
I'm not sure, I guess it may generate too many log files for a long time operation.

Or is there any way to check which log files are there? Find out the reason for slow writing from it?

Because it is very fast to do query or read project issues, only the modification and creation speed is very slow.

#7 Updated by li ru over 1 year ago

Pavel Rosický wrote:

you should use a more recent Redmine version in terms of performance and security. Redmine 3.4.6 is no longer supported. All plugins you have installed should work (or with a little effort), but they may need an upgrade aswell.

How can I find out where the problem is?
1/ I would recommend you to track slow DB queries. Find out why they're slow with EXPLAIN https://www.exoscale.com/syslog/explaining-mysql-queries/
2/ try it without plugins
3/ use a profiler like https://github.com/MiniProfiler/rack-mini-profiler (advanced)
4/ it could be something completely different, it's hard to guess why is Redmine slow on your own server without actually knowing anything specific.

Or how to clear unwanted junk files?
What do you mean by junk files?

https://docs.rackspace.com/support/how-to/understanding-logrotate-utility/ ?

I'm not sure, I guess it may produce too many log files if you use [remdine] for a long time.

Or are there any log files that can be checked to find the reason for the slow writing?

Because it is very fast to do query or read project issues, only the modification and creation speed is very slow.

#8 Updated by Go MAEDA over 1 year ago

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

Please use forums for questions. Issues are used to report a bug, suggesting a new feature, or submitting a patch. Reading How to request help may be helpful for you.

#9 Updated by li ru over 1 year ago

#10 Updated by li ru over 1 year ago

Pavel Rosický wrote:

you should use a more recent Redmine version in terms of performance and security. Redmine 3.4.6 is no longer supported. All plugins you have installed should work (or with a little effort), but they may need an upgrade aswell.

How can I find out where the problem is?
1/ I would recommend you to track slow DB queries. Find out why they're slow with EXPLAIN https://www.exoscale.com/syslog/explaining-mysql-queries/
2/ try it without plugins
3/ use a profiler like https://github.com/MiniProfiler/rack-mini-profiler (advanced)
4/ it could be something completely different, it's hard to guess why is Redmine slow on your own server without actually knowing anything specific.

Or how to clear unwanted junk files?
What do you mean by junk files?

https://docs.rackspace.com/support/how-to/understanding-logrotate-utility/ ?

Hi there,
I found the main reason.

https://www.programmersought.com/article/63481036151/

#11 Updated by li ru over 1 year ago

Jacob Evans wrote:

Hi,
That version of Redmine seems quite old so if possible maybe try and update it to the latest version.

Thanks

Hi there,
I found the main reason.

https://www.programmersought.com/article/63481036151/

Also available in: Atom PDF