Hi, Guillaume Rossolini wrote: > You needn't be concerned, as Zend_Log uses system-level > file locking. And as you know, the OS is above apache ;) > That means that multiple simultaneous Zend_Log instances > do not immediately write or fail, they wait in a queue until > they manage to write or until their timeout happens.
The last part is important. We don't know what your script is doing next to your logging. We don't know what you are logging. We don't know other I/O operations, the system the application is served from is doing. So the only problem you could run in would be a script execution timeout, because the script is still waiting to be able to write to that log file, which is currently locked by other instances. What you can do: 1) Benchmark your system. Write a script which will write to a log file and run it as much as you can. It will show you, how many parallel calls your system is able to serve. Then you could limit your apache to that number... 2) Try to delay your logging. Maybe you can use Zend Job Queue/Zend_Queue. 3) Use another writer, which is optimized for high performance logging (keep in mind that logging to a file isn't really fast, because on every call you first lock the file, open it, write to it, close the file and finally unlock it. A writer like syslog keeps the log file opened for example). -- Regards, Thomas
