Re: [users@httpd] Apache creates Semaphore

2017-11-10 Thread Yann Ylavic
Hi Hemant, On Fri, Nov 10, 2017 at 6:13 AM, Hemant Chaudhary wrote: > > Yes kill -Term works for me even without patch of code. Good. > I have one more doubt, I checked with ipcs command that there is only entry > of semaphore and no entry in shared memory. > >

Re: [users@httpd] Apache creates Semaphore

2017-11-09 Thread Hemant Chaudhary
Hi, Yes kill -Term works for me even without patch of code. I have one more doubt, I checked with ipcs command that there is only entry of semaphore and no entry in shared memory. If I have nothing in shared memory then why am I using semaphore? What are the critical section in apache for which

Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Yann Ylavic
On Fri, Nov 3, 2017 at 12:42 PM, Hemant Chaudhary wrote: > > I killed as kill -9 process_id_of_httpd Well, you don't let httpd cleanup anything before exiting by doing this (it's simply killed immediately). Why kill with no arg (i.e. kill -TERM) wouldn't be

Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Hemant Chaudhary
Hi I build httpd by myself from source code on HPE nonstop. On Nov 3, 2017 5:12 PM, "Yann Ylavic" wrote: > On Fri, Nov 3, 2017 at 7:09 AM, Hemant Chaudhary > wrote: > > > > When I am setting Mutex pthread or Mutex Pthread default in

Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Yann Ylavic
On Fri, Nov 3, 2017 at 7:09 AM, Hemant Chaudhary wrote: > > When I am setting Mutex pthread or Mutex Pthread default in httpd.conf, > getting following error > > AH00526: Syntax error on line 42 of > /home/hemant_super/hemant/dev_11oct/conf/httpd.conf: > Invalid

Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Hemant Chaudhary
Hi I killed as kill -9 process_id_of_httpd On Nov 3, 2017 5:05 PM, "Yann Ylavic" wrote: > Hi Hemant, > > On Fri, Nov 3, 2017 at 12:01 PM, Hemant Chaudhary > wrote: > > I tried with the patch of code you have asked for prefork.c and

Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Yann Ylavic
Hi Hemant, On Fri, Nov 3, 2017 at 12:01 PM, Hemant Chaudhary wrote: > I tried with the patch of code you have asked for prefork.c and worker.c. > But If I am closing apache gracefully then semaphore is not in shared > location but if I am killing process then

Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Hemant Chaudhary
Hi, I tried with the patch of code you have asked for prefork.c and worker.c. But If I am closing apache gracefully then semaphore is not in shared location but if I am killing process then still semaphore is there in shared location. Is there any way I get rid of semaphore because I want to run

Re: [users@httpd] Apache creates Semaphore

2017-11-03 Thread Hemant Chaudhary
Hi Yann, When I am setting Mutex pthread or Mutex Pthread default in httpd.conf, getting following error AH00526: Syntax error on line 42 of /home/hemant_super/hemant/dev_11oct/conf/httpd.conf: Invalid Mutex argument pthread (Mutex mechanisms are: 'none', 'default', 'fcntl:/path/to/file',

Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Yann Ylavic
Hi Hemant, On Thu, Nov 2, 2017 at 12:08 PM, Hemant Chaudhary wrote: > > For my product I need to run apache as single process. As httpd -X works for > me. But the issue is to stop httpd -X, we need to kill process. While > killing the process, semaphore exists in

Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Hemant Chaudhary
Hi Luca, If I choose to go with MPM and to spawn single process then it will create parent process and then child process where parent process monitor the server and child process serve the request. But I need only one process which works for both as parent and child which is achieved in httpd

Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Luca Toscano
Hi Hemant, as indicated in https://httpd.apache.org/docs/2.4/mod/core.html#mutex you can use different kind of mutex implementations and experiment with them. >From your description though it seems to me that your approach of killing httpd leads to semaphore leaking, something that would be

Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Hemant Chaudhary
Hi Yann, For my product I need to run apache as single process. As httpd -X works for me. But the issue is to stop httpd -X, we need to kill process. While killing the process, semaphore exists in kernel directory. If I repeat for 10-15 times, then it will give error like no space available on

Re: [users@httpd] Apache creates Semaphore

2017-11-02 Thread Yann Ylavic
Hi Hemant, On Thu, Nov 2, 2017 at 5:47 AM, Hemant Chaudhary wrote: > > Semaphore is used in multi process environment to share resources within > processes. But when I am starting apache in debug mode i:e single process > then still it creates semaphore. May I