Re: sleep, poll and select - 100% CPU
- From: kkivi <konstantin.kivi@xxxxxxxxx>
- Date: Fri, 29 May 2009 11:16:17 -0700 (PDT)
On 29 май, 04:22, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On May 28, 7:46 am, kkivi <konstantin.k...@xxxxxxxxx> wrote:That is not the case.
We have an application (actually several, using the same framework)
that started to consume 100%CPU. ( Worked for years normally untill
now).
It starts doing so only after running for several days. It contains
several processes, that mainly
do something like
for (;;) {
sleep or poll or select for 25 seconds;
do_little_task();
}
Make absolutely sure that if you 'select' for something, you can do
that something when 'select' returns. If you don't do whatever it is
'select' told you that you could do, your next call to 'select' won't
block either.
The problem was in hidden thread created by Oracle after we changed
database connection options.
Then some problem on server ( still unclear) caused that thread to run
at 100%CPU.
.
- Next by Date: Re: Clumsy interface of epoll
- Next by thread: Re: Clumsy interface of epoll
- Index(es):