Limit on Child Processes

General support questions
Post Reply
bdushok
Posts: 2
Joined: 2019/11/11 15:57:37

Limit on Child Processes

Post by bdushok » 2019/11/11 16:06:02

I'm running SOGo on Centos 7.6.1810. SOGo provides a web based groupware solution and includes support for ActiveSync. I've been having trouble with ActiveSync support which I believe may be OS related.

When sogod starts it spawns multiple child processes to service incoming requests. ActiveSync clients tend to keep connections open and hog these processes. I've been having capacity problems due to insufficient child processes.

I've attempted to increase the number of child processes and have been successful, until I reach 509 processes. It will successfully start 508 processes. At 509 or anything greater it puts the following in logs:
sogod [1716]: [ERROR] <0x0x5595d0273e50[WOHttpAdaptor]> failure notifying watchdog we are ready during events registration: <NGSocketShutdownDuringWriteException: 0x5595d0273770> NAME:NGSocketShutdownDuringWriteException REASON:the socket was shutdown INFO:{errno = 32; error = "Broken pipe"; stream = "{object = 0x5595d03818f0;}"; }"

I've been researching per user limits on processes and have made changes unsuccessfully. I've changed /etc/security/limits.d/20-nproc.conf to include:
sogo soft nproc unlimited
sogoeas soft nproc unlimited
root soft nproc unlimited

sogo and sogoeas are the users I'm using to run sogod.

The above change didn't help, so I tried changing /etc/security/limits.conf to include:
sogo - stack 32768
sogo - nproc 8192
sogoeas - stack 32768
sogoeas - nproc 8192

Again, no change.

Does anyone have any suggestions?

Thanks,
Bob

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Limit on Child Processes

Post by TrevorH » 2019/11/11 17:05:48

Also don't forget that in *ix terms, everything is a file including network connections. That means you also need to set nofile as well. I'd recommend using a separate file in /etc/security/limits.d/ to make your changes so that it's not overwritten or replaced. The files there are also processed in alpha order so if you make yours 00-myfile.conf and there are other files in that dir that contain things for the same user, they will override your 00 ones - so name your file alphabetically last so it's processed last.

And then we come to the elephant in the room... systemd doesn't take any notice of those limits at all so if you are starting this process via a system unit file (and if not, why not!) then you need to set the limits in its unit file. Search man systemd.exec for "Limit" for the list of parameters that can be specified. If the unit file is one of your own coding then you can just edit it. If the file is supplied by a package and installed under /usr/lib64/systemd/system then you need to copy it to /etc/systemd/system before you amend it or the next package update will replace the /usr file and revert any changes you have made.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

bdushok
Posts: 2
Joined: 2019/11/11 15:57:37

Re: Limit on Child Processes

Post by bdushok » 2019/11/12 15:19:52

Trevor,

Thanks for your assistance. I was able to correct this problem using an override.conf file within /etc/systemd/system. I've specified infinity for both LimitNOFILE and TasksMax to correct the problem.

Thanks again for your assistance!
Bob

Post Reply