On Mon, Dec 7, 2020 at 6:33 PM Wendell Hatcher
<wendellhatcher1...@gmail.com> wrote:
>
> Yann, quick question would it be ok to have a cronjob running daily maybe at 
> slow periods that runs a script to delete the sephmore segments using a 
> script while apache is running? It shouldn't cause issues with the apache 
> server processing data correct?

I think that the error is about shared memories (SHM), not semaphores
(your httpd -V output shows "-D APR_USE_PROC_PTHREAD_SERIALIZE" which
indicates the use of pthread global mutexes, not backed by a system
descriptor/inode, so nothing to cleanup really).

The SHMs usually do have a descriptor or inode to delete somewhere on
your system, but I don't think it's safe to do so while httpd is
running.
By the way, you didn't tell which SHM mechanism was used by the APR
library on your system (which system? httpd/APR compiled manually?
SysV, POSIX or other SHM mechanism? Where do your SHMs land on the
filesystem?).
It is not shown by httpd -V unfortunately (I added it to trunk lately,
but it's not in any 2.4 version yet).


> Second ndly, we want to run a script during our apache stop process that will 
> deleting the files from the shm folder we are hoping this will reschedule le 
> our hanging apache servers during stops and starts with a slotmem error.

I'm not sure to understand this, deleting the SHMs could avoid
conflicts temporarily but as soon as all the httpd instances are
started again, the conflicts will show up again if they exist in the
configuration files.

One particular thing to look at are the URLs used in <Proxy
balancer://[id]> declarations, in all the instances.
Each balancer should have a unique [id], system wide, because a SHM
will be created (system wide) based on this [id]. This is usually not
an issue with a single httpd instance where uniqueness makes sense and
balancer1,..,n is simply/often used, but when this first instance gets
copied to create others then it breaks..
You can use almost anything as [id], provided it's unique and the same
[id] is used in the associated ProxyPass. It can be a UUID for
example, a tool like `uuidgen` can generate one when a new balancer
needs to be added.

Hth,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to