Updating an issue in redmine takes 10 seconds


I'm running redmine 1.3.2 in a virtual Windows Server 2008 R2. Updating or creating an issue takes a long time. Here is a snippet from our logs:

Processing IssuesController#create (for xxx.xxx.xxx.xxxx at 2012-04-25 19:39:13) [POST]
  Parameters: {"commit"=>"Create", "project_id"=>"test", "action"=>"create", "authenticity_token"=>"", "issue"=>{"start_date"=>"2012-04-25", "custom_field_values"=>{"1"=>"?"}, "estimated_hours"=>"", "parent_issue_id"=>"", "priority_id"=>"4", "is_private"=>"0", "fixed_version_id"=>"", "done_ratio"=>"0", "assigned_to_id"=>"", "subject"=>"Test 2", "tracker_id"=>"1", "due_date"=>"", "status_id"=>"1", "description"=>""}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}
Sending email notification to: xxx@xxx.com
Redirected to http://mysite.com/project/issues/35
Completed in 10483ms (DB: 0) | 302 Found [http://mysite.com/project/projects/test/issues]

I've looked in the database.yml file and see that reconnect is set to true:

  adapter: mysql
  database: bitnami_redmine
  host: localhost
  username: ''
  password: ''
  port: 3306
  reconnect: true
  encoding: utf8

So that can't be it.

Anybody ideas?



We can't reproduce this error. Could you provide more information in order we can find the problem. Which instance type are you running? Do others operations take such long time? Have you modified the default configuration or installed any plugin?

We found the problem. It's the sending of the e-mail that is causing the delay.

We have redmine set up to send notifications via an smtp server which has a built-in 10 second delay for the sending of emails (it's some kind of security feature). Redmine waits for the smtp server to reply before continuing the execution of the code. It locks up the main thread thus freezing the entire application for that 10 seconds. Other users cannot use redmine during that period.

We solved it by switching to a local smtp server and now it's blazing fast again.

I'm not a RoR developer (my background is C#) but I believe that this problem can be fixed by running the smtp code asychronously. We're using Bitnami redmine stack version 1.3.2-0. I'll see if there has been a mention of this at the Redmine project otherwise I'll submit a bug there.



PS: I have to say I am impressed with the level of documentation and support that we have been getting from Bitnami. Keep up the good work!


Thanks a lot!!

Take a look at this article http://www.redmineblog.com/articles/asynchronous-email-delivery/ It is not the default configuration but this could help you.


Cool! I'll give that a try when I get the chance.

Hi Yuioup,

Please help me as well on how did you switch to a local smtp server. as we are facing the same problem whenever updating and im pretty sure its due to the mail connection as well.

We're running Redmine on a Windows server and have installed the standard Windows SMTP server component. Because it's insecure, we set it to only accept local connections (otherwise your machine will turn into a spam bot).

We modified the configuration.yml to:

default: # Outgoing emails configuration (see examples above) email_delivery: delivery_method: :smtp smtp_settings: tls: false address: port: 25 domain: mydomain.com authentication: :none enable_starttls_auto: true

This is insecure so be sure to configure your firewall!!!