2013年4月1日星期一

redmine submit issue slowly


Why creating or updating an issue is so slow ?!

 Mickael Fradin  超过 3 年 之前添加
Hello, I'm just wondering why mongrel/webrick is so slow to perform certain tasks while others are extremely fast?!
I'm using mongrel-1.1.5, mysql-5.0.70-r1 and tried at first with webrick with the same result. When i'm editing something in the wiki section for example it's fast, but doing the same thing on issues is extremly slow, around 60s... :-(
I can't figure out what's going on... Below the production.log:
Processing IssuesController#edit (for 80.xx.xx.xx at 2009-05-18 11:33:19) [POST]
  Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Submit", "action"=>"edit", "id"=>"27", "notes"=>"", "controller"=>"issues", "issue"=>{"start_date"=>"2009-05-06", "estimated_hours"=>"", "priority_id"=>"4", "lock_version"=>"2", "subject"=>"ERREUR NUMEROTATION OPE DE GAMME", "description"=>"Lorsque l on rajoute une opé la numerotation recommence a 2 au lieu de s ajoute a la précédente", "fixed_version_id"=>"", "category_id"=>"", "done_ratio"=>"0", "due_date"=>"", "assigned_to_id"=>"6", "status_id"=>"1"}, "attachments"=>{"1"=>{"description"=>"", "file"=>""}}}
Redirected to actionshowidAnomalie #27: ERREUR NUMEROTATION OPE DE GAMME
Completed in 60154ms (DB: 28) | 302 Found [http://xxx.xxx.fr/issues/27/edit]
As you can see this is not the DB the problem, but how to detect the problem ?!
Please help me!
If you need more information tell me!
Thanks.
Mike.

回复 (2)

RE: Why creating or updating an issue is so slow ?! - 由 Mickael Fradin  超过 3 年 之前添加

Just answering to myself and maybe for people experiencing the same problem ;)
The problem was my email configuration... It wasn't configured well so the script was waiting until the smtp timeout! 
Maybe an improvement would be to notify this kind of thing inside the logs ?!
Thank you for this great project!

RE: Why creating or updating an issue is so slow ?! - 由 michael fox  超过一年 之前添加

Thanks. That was very helpful to me too.
 
 
 
 
找到原因,就要找解决方法:(红色字)
 

Email Configuration

Configuration Directives

This page is a work in progress, the following configuration directives are only a partial list.

authentication

The type of authentication method expected by your service provider.
Valid settings:
  • :login
  • :none
(note: if you set this to :none, you must not include the user_name and password settings)

delivery_method

The mail transport method to be used.
Valid settings:
  • :smtp
  • :async_smtp
  • :sendmail
  • :async_sendmail

Asynchronous delivery_methods

The :async_smtp and :async_sendmail use asynchronous sends, which means Redmine does not wait for the email to be sent to display the next page. SeeAsynchronous Email Delivery for more details.
NB : if you want to use asynchronous sends, be careful there's a regression in Redmine 2.x which implies a modification of the "smtp_settings" key in yourconfig/configuration.yml. See #11376 for more informations.

Example configuration.yml Configurations

Simple Login Authentication (default settings)

# Outgoing email settings
 
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.example.net
      port: 25
      domain: example.net
      authentication: :login
      user_name: redmine@example.net
      password: redmine
 
development:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: 127.0.0.1
      port: 25
      domain: example.net
      authentication: :login
      user_name: redmine@example.net
      password: redmine
If you want to use GMail/Google Apps and other TLS-requiring SMTP servers, you'll have to add some TLS-related settings :
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com"
      port: '587'
      domain: "smtp.gmail.com"
      authentication: :plain
      user_name: "your_email@gmail.com"
      password: "your_password"
 
However, this will only work with "recent" enough ruby and rails versions (1.8.7 patchset 2xx and 2.3.5).
(See #5814 )

No Authentication

Example for an SMTP service provider with no authentication. Note the colon before none.
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.knology.net
      port: 25
      domain: cybersprocket.com
      authentication: :none

Using sendmail command

Example for a unix system that uses the /usr/sbin/sendmail command.
production:
  email_delivery:
    delivery_method: :sendmail

More information

 
 
将原来的
    delivery_method: :smtp
    smtp_settings:
 
改成:
 
    delivery_method: :async_smtp
    async_smtp_settings:

没有评论:

发表评论