NOTICE: PHP message: PHP Warning: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /app/application/../data/session) in /app/library/composer/diablomedia/zendframework1-session/src/Zend/Session.php on line 698
After cleaning some not required session closes the error became rarer but still is easy to reproduce to call a controller which closes the session a couple of times.
I will refactor this to use a Insert/Update statement instead and post a PR.
This function has a race-condition:
https://github.com/diablomedia/zf1-session-savehandler-dbtable/blob/26e6930b2db324cb5df074a1422603dec2d0ad85/src/Zend/Session/SaveHandler/DbTable.php#L308
When multiple workers are running and the underlying session, which is checked at Line https://github.com/diablomedia/zf1-session-savehandler-dbtable/blob/26e6930b2db324cb5df074a1422603dec2d0ad85/src/Zend/Session/SaveHandler/DbTable.php#L315 is closed & deleted before it hits the update stmt https://github.com/diablomedia/zf1-session-savehandler-dbtable/blob/26e6930b2db324cb5df074a1422603dec2d0ad85/src/Zend/Session/SaveHandler/DbTable.php#L320 it won't return true and cause a log warning.
I wrongly opened this issue before https://github.com/diablomedia/zf1-session/pull/6
After cleaning some not required session closes the error became rarer but still is easy to reproduce to call a controller which closes the session a couple of times.
I will refactor this to use a Insert/Update statement instead and post a PR.