In this case the biz logic is written in PHP. I am a PHP/Apache newbie so please pardon my ignorance!
When we fulfill a web request in PHP we need to log the response into a file for later processing. The response can be anywhere from 2k to 6k. We clocked our PHP app and it services about 60 requests per sec. I tried just creating a file for containing each response, but due to high request volume, we were generating 2,400 files in 400 seconds. This created too much load on the system, plus the resulting number of individual log files (one for each web
request) was unmanageable (not to mention using up all available iNodes or file handles).
We figured since Apache is ultra-efficient at logging (like how their access log files get sooo big yet this logging task does not noticeably drag down the server), can we in PHP somehow use Apache's logging service? It would be great if all PHP threads can just somehow pass Apache our log data and have it stash them in one big file (that rolls on some schedule). This way we avoid creating tons of little files, and our PHP threads can effectively share a log file handle without having to serialize (lock/unlock) access to the log file.
We've considered throwing these into a DB but can something like MySQL handle this kind of load?
Has anyone done this or have ideas or leads?
Thanks in advance for your help!
Can biz componet get write access to Apache's log
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users