zzelman
zzelman

Reputation: 425

What happens if PHP's session garbage collection takes a long time?

If I implement my own SessionHandlerInterface and the gc function takes a really long time to complete, will it make the web request that started the gc appear to hang to the user? Is there any way to make the gc not block the web request that started it?

Upvotes: 2

Views: 61

Answers (1)

Jon
Jon

Reputation: 437376

No, not directly.

If you have a GC implementation that takes a long time to complete it's much preferable to run it as a periodic background task independent of user requests.

Upvotes: 2

Related Questions