[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MHD Conection timeout seems to hog the CPU

From: Christian Grothoff
Subject: Re: [libmicrohttpd] MHD Conection timeout seems to hog the CPU
Date: Tue, 10 May 2011 14:29:04 +0200
User-agent: KMail/1.13.6 (Linux/2.6.38-8-generic-pae; KDE/4.6.2; i686; ; )

Hi David,

There should be no significant processing when a connection closes (socket 
close, remove from list, free, done).  If you could produce a testcase for 
this, that would be great.  Alternatively, running 'strace' to see if there is 
some "unusual" behavior in terms of system calls might also be insightful.

Here are some other questions that might help me narrow down the issue.  If 
you set the timeout to 10s, does the "stuttering" still happen "only" for 1s, 
or does it then take 10s? Or is it not clear how long the "stuttering" is?  
How high is your CPU load during the "stuttering"? Does it go away entirely 

Happy hacking!


On Tuesday, May 10, 2011 01:55:06 PM David J Myers wrote:
> Hi,
> My video streaming webserver can stream multiple video streams
> simultaneously, and these streams can come and go, ie start and stop.
> It seems that when a connection closes (client navigates away), and after
> the MHD_OPTION_CONNECTION_TIMEOUT has expired, my main process thread is
> halted for up to one second. If I change the timeout, the halt seems to
> follow the new value ie if I set this to 10 seconds, I get a pause in my
> main thread 10 seconds after a video connection closes. This is very bad
> for me as all remaining video streams stutter and jerk for up to one
> second.
> Is there any known CPU-intensive processing in MHD which happens when a
> connection closes? I am using a thread pool but this also happens if I
> Any advice would be gratefully received.
> Best regards
> David

reply via email to

[Prev in Thread] Current Thread [Next in Thread]