Relationship Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017458 | mantisbt | api soap | public | 2014-06-19 11:37 | 2024-10-07 12:30 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0dev | ||||
Target Version | 1.3.0-beta.1 | ||||
Summary | 0017458: SOAP API does not send e-mails | ||||
Description | While debugging an issue, I noticed that calling a SOAP API that generates a notification from SOAP (e.g. mc_issue_add), the email is generated properly and queued in the table, but never actually sent. | ||||
Tags | No tags attached. | ||||
Research shows that this is a regression introduced by cea405ccf. There was some discussion on Github for that commit, where rombert already identified this as an issue [1]. Grangeway opened a follow-up pull request [2], but that was never merged. [1] https://github.com/mantisbt/mantisbt/commit/cea405ccf228fd2c6ac694574a74e87396b14f1f#commitcomment-5010282 |
|
I just tested Paul's patch, it does solve the problem so I'll apply it to master. With regards to the remaining issue with plugins as mentioned by atrol and grangeway's suggestion to use a register_shutdown_function() call, I'll create another issue to track it and we can follow up later. |
|
MantisBT: master cea405cc 2014-01-07 11:28 Paul Richards Details Diff |
Performance optimisation for users not using email send via cron jobs and using php-fpm - generally this would be nginx users. Windows(IIS) fastcgi does not use php-fpm. |
Affected Issues 0017458 |
|
mod - core/email_api.php | Diff File | ||
mod - core/html_api.php | Diff File | ||
MantisBT: master d233a9da 2014-01-17 11:18 Paul Richards Committer: dregad Details Diff |
Fix SOAP API not sending e-mails Fixes regression introduced by cea405ccf228fd2c6ac694574a74e87396b14f1f. Emails are now sent at the end of the SOAP call. Fixes 0017458 Original code form https://github.com/mantisbt/mantisbt/pull/113 Signed-off-by: Damien Regad <dregad@mantisbt.org> |
Affected Issues 0017458 |
|
mod - api/soap/mantisconnect.php | Diff File | ||
MantisBT: master a6447064 2014-06-19 08:27 Details Diff |
Fix 0017458: SOAP API does not send e-mails |
Affected Issues 0017458 |
|
mod - api/soap/mantisconnect.php | Diff File | ||
mod - core/logging_api.php | Diff File | ||
MantisBT: master 9c45e146 2015-03-30 05:41 Details Diff |
Synchronous email sending via shutdown function Mantis provides 2 ways of processing email: synchronously (default) or using a cron job. Historically, the former was achieved by processing the email queue immediately after each email-generating action. This approach could lead to a severe performance degradation when the queue contains a backlog of pending messages which can't be sent (e.g. due to invalid email addresses or server problems). In early 2014, an attempt was made to improve this for fastcgi by processing the queue at the bottom of each displayed page (in html_end() function), which introduced regressions for SOAP API (issue 0017458) as well as plugins and other corner cases (issues 0017460). This commit resolves the problem by registering a shutdown function to process the email queue in core.php, which ensures that email gets sent no matter what. To avoid multiple executions of the shutdown function for a single user request (which may lead to several executions of core.php, e.g. when building dynamic css, javascript translations, etc), an arbitrary 5 seconds delay is observed between each register_shutdown_function() call. Fixes 0017460 |
Affected Issues 0017458, 0017460 |
|
mod - api/soap/mantisconnect.php | Diff File | ||
mod - core.php | Diff File | ||
mod - core/email_api.php | Diff File | ||
mod - core/html_api.php | Diff File |