I have lighty installed just for playing videos however i'm having to following problems:

Described in error log (videos stop playing when 2.problem occurs):

1. We waited 360 seconds. If this a problem increase server.max-write-idle

2. "... accept() failed: Too many open files"


The first problem is i think not server side , based on my invastigations in several forums. And it does not affect anything. However the second is a huge problem. After i install lighttpd. It works for about 5-6 hours, then the following message comes "... accept() failed: Too many open files" IT should mean there are too many open files or file descriptors, but i changed fd limit value to 4096 as i was guided from other forums, but the problem still exists.
what shell i do? Make it unlimited?

ps.: anyone having the same config must be having the first problem as well! Just check /var/log/lighttpd/error.log