0

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).

Nic
  • 6,211
  • 10
  • 46
  • 69
user3449979
  • 439
  • 1
  • 5
  • 7
  • Possible duplicate of [php flock behaviour when file is locked by one process](http://stackoverflow.com/questions/18833448/php-flock-behaviour-when-file-is-locked-by-one-process) – Jehy May 10 '16 at 12:11
  • I've cleaned up some of the English and formatting, but since I don't know much PHP, I might have left some stuff out. – Nic May 12 '16 at 12:48

0 Answers0