We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Long Polling - how to session_write_close()

I tried to write a simple long polling script today.
I have a problem where the server gets blocked while the polling is going on. I found this:


telling me to have the session not lock the server.


Closing the session did not really help. Does Phalcon ignore this command, does phalcon lock any other stuff on the server?

I'm on an xampp(32bit) windows 7 x64.


Phalcon does not lock any stuff on the server. Sessions are managed and closed by PHP not by the framework.

edited Mar '14

To help others: Phalcon is of course not the problem. I had to close the database connection before the sleep/usleep like this:

$this->di->getShared('db')->close() // i have not tried $this->db->close() which might work as well??
$this->di->getShared('db')->connect() // if needed