Sign in
Log inSign up

Is it good practice to do session_write_close() to allow another requests getting served?

Ankur Raiyani's photo
Ankur Raiyani
·Mar 23, 2018

My app is in Magento 2 and performing some long tasks from magento to shell. So in script execution time server is not serving to any other requests of that particular session until that task is getting finished and request completes. So i found that problem is with session lock and found solutions on php forums that using session_write_close() i can allow another requests of same session to perform their tasks.

But i don't know is it safe to do session_write_close().

NOTE: I don't need to write anything in session after closing it.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct