My hosting company migrated my server to a newer machine a week or so ago and aside from a small ORDERBY issue on one query, things were running very smoothly.
Last night, out of the blue, I started getting terrible speed on my sites and found an error log full of "socket() failed (24: Too many open files) while connecting to upstream" errors. I was thinking something in my custom CMS admin might be going haywire and worked on it for a couple hours last night before the error messages suddenly went away and everything started running smoothly.
This afternoon, the server started acting up again. I rebooted the machine and it immediately started filling the nginx error log with the same errors. Again, after 10 minutes or so, the errors stopped and the server has run smoothly since then.
I am not a UNIX admin by any means, but I can think fairly logically. I am at a loss as to what the heck is going on here.