View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037450 | mantisbt | public | 2026-10-16 06:03 | 2026-10-16 06:03 | |
| Reporter | Predator | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | sometimes |
| Status | new | Resolution | open | ||
| Platform | Apache 2.4.66 / PHP 8.5.4-FPM | OS | Ubuntu | OS Version | 26.04.1 LTS |
| Product Version | 2.28.4 | ||||
| Summary | 0037450: Session lock during shutdown email delivery delays issue pages after updates | ||||
| Description | After adding a note or updating an issue, the redirected issue page email_shutdown_function() calls fastcgi_finish_request() and then PHP-FPM slowlog captured nine affected requests, all waiting in Expected behavior: save and release the active session before | ||||
| Steps To Reproduce |
For deterministic reproduction, we tested the extracted shutdown | ||||
| Additional Information | Database: MariaDB 11.8.6. PHP sessions use the files handler. We added the following inside the existing
This reduced the isolated test's session_start() wait to 0.02 ms. After applying the change locally, 44 successful issue-page requests Could you review this change for inclusion upstream? | ||||
| Tags | No tags attached. | ||||
| Attached Files | session-unlock-2.28.4-2026-10-15.patch (409 bytes)
--- a/core/email_api.php
+++ b/core/email_api.php
@@ -2273,6 +2273,10 @@
log_event( LOG_EMAIL_VERBOSE, $t_msg );
if( $g_email_shutdown_processing ) {
+ # Release the session before background email delivery (Mirror, 2026-10-15).
+ if( PHP_SESSION_ACTIVE === session_status() ) {
+ session_write_close();
+ }
if( function_exists( 'fastcgi_finish_request' ) ) {
fastcgi_finish_request();
}
| ||||