P
Philip Mak
I have a multi-threaded http server. Sometimes, it gets into a state
where it stops responding to requests, and if I press Ctrl+C at the
console it takes a long time to respond. The "ruby -rprofile" shows
this at the top:
% cumulative self self total
time seconds seconds calls ms/call ms/call name
62.65 1.04 1.04 30 34.67 853.00 Thread#stop
9.64 1.20 0.16 37 4.32 18.38 Kernel.require
9.04 1.35 0.15 1 150.00 220.00 IO#each
7.23 1.47 0.12 152 0.79 0.92 Kernel.sleep
I never call Thread#stop explicitly in my program so it's surprising
that Thread#stop takes up so much time... although I do have both
Timeout and Mutex.
Anyone know what to make of this 62.65% time consumption by
Thread#stop? Could it be that somehow my threads are deadlocking each
other?
where it stops responding to requests, and if I press Ctrl+C at the
console it takes a long time to respond. The "ruby -rprofile" shows
this at the top:
% cumulative self self total
time seconds seconds calls ms/call ms/call name
62.65 1.04 1.04 30 34.67 853.00 Thread#stop
9.64 1.20 0.16 37 4.32 18.38 Kernel.require
9.04 1.35 0.15 1 150.00 220.00 IO#each
7.23 1.47 0.12 152 0.79 0.92 Kernel.sleep
I never call Thread#stop explicitly in my program so it's surprising
that Thread#stop takes up so much time... although I do have both
Timeout and Mutex.
Anyone know what to make of this 62.65% time consumption by
Thread#stop? Could it be that somehow my threads are deadlocking each
other?