Skip to content

Conversation

@xavierleune
Copy link
Contributor

Hi there,

I was investigating the bug reported in #977 and I found that there is a lot of things that leaks between worker requests:

The current pull requests now:

  • Checks all values of ini & session before the first request is handled
  • Reset values that changed between requests

This changes improves support of worker mode for legacy applications, that do nasty stuff sometimes ^^

@xavierleune xavierleune changed the title fix(worker): reset ini and session if changed during worker fix(worker): reset ini and session if changed during worker request Jan 23, 2026
@AlliBalliBaba
Copy link
Contributor

Not sure if the session logic belongs in this repo. On one hand we reload the session module, which purges all sessions and handlers. On the other hand this PR would then go back in and re-instate the session handler, which feels very messy.
I think it would make more sense to either not reload native sessions at all between requests and let the user-space handle this (same as with other globals). Or to add a hook into the session extension itself to make it compatible with a stateful model.

Restoring ini entries seems more sensible o me 👍 . We'd have to consider though that restoring ini entries can have other side-effects. Say, memory_limit is already above a certain value and you're trying to restore it to a lower value, that would obviously fail. Would be nice knowing what else could potentially fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants