Sometimes my server freezes after a call flock()
, and only rebooting it will unfreeze it.
This happens because PHP's flock()
ignores the execution time limit and some errors when LOCK_UN
is used.
Question: How can I set the time limit for flock()
?
This must work without LOCK_NB
, because if I use that I get errors with parallel scripts (The queue sequence gets broken).