how to break out of FCGX_Accept_r - multi-threaded fastcgi performance

Jack <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Hello,

If you need to recycle the fastcgi processes, using a counter
is much easier than a timer. I know this doesn't really answer
Andrej's question :)

I have another question though. I'm glad to see lots of replies
to the question. I suppose many people are using multi-threaded
fastcgi servers because FCGX_Accept_r() is the thread-save version
of FCGX_Accept(). Or, do most people just use FCGX_Accept_r()
in single-threaded fastcgi servers?

Anyway, I have a question for the multi-threaded fastcgi developers.
I tested the multi-threaded sample and experienced very poor
performance. Each request takes about 3 seconds. I sent an email
to the list but didn't get any replies. I thought no one was using
multi-threading :) I also read another earlier post mentioning the
same 3-second issue with Apache2 + mod_fastcgi. I used lighttpd but
the symptoms were very similar. So, my question is, are you, the
multi-threading users, getting good performance? Even with the
sample that comes with fastcgi? Could there be something that I did
wrong?

-- 
Best regards,
Jack

>>> ----- Original Message ----- From: "Andrej van der Zee"
>>> <[email protected]>
>>> To: <fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org>
>>> Sent: Friday, November 18, 2005 10:40
>>> Subject: [FASTCGI] how to break out of FCGX_Accept_r
>>>
>>>
>>>> Hi,
>>>>
>>>> I would like to know if it is possible to break out of the pending
>>>> accept-call and how to do this. The problem is, I have to shutdown the
>>>> fast-cgi after it has been runnig for 8 hours. In c++, when I schedule a
>>>> threat that wakes up after 8 hours, the fast-cgi main-loop can be in two
>>>> situations:
>>>> 1) It is handling a request. In this case the fast-cgi should finish
>>>> after handling it. This can be done with FCGX_ShutdownPending(). No
>>>> problem here.
>>>> 2) The main-loop is in FCGX_Accept_r waiting for an incomming 
>>>> connection. In this case I would like to break out of the accept and
>>>> immideately finish the fast-cgi application.
>>>>
>>>> In the threat that wakes up after 8 hours, I was thinking to raise a
>>>> signal in case 2 only. Though, how can I be sure that we are in case 2?
>>>> Setting flags before entering and after leaving FCGX_Accept_r is not
>>>> sufficient because my treat may wakeup when fast-cgi already accpeted a
>>>> request, but has not come out of FCGX_Accept_r yet.
>>>>
>>>> Any ideas? Any other solutions?
>>>>
>>>> Thanks a bunch!
>>>>
>>>> Andrej

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.