friendica / docker

Docker image for Friendica
https://friendi.ca
GNU Affero General Public License v3.0
45 stars 18 forks source link

Apache - MPM prefork configuaration #115

Closed valvin1 closed 3 years ago

valvin1 commented 4 years ago

I'm looking at current Apache configuration. Container is set to run using MPM prefork which process based.

Current config is :

<IfModule mpm_prefork_module>
    StartServers             5
    MinSpareServers       5
    MaxSpareServers      10
    MaxRequestWorkers     150
    MaxConnectionsPerChild   0
</IfModule>

It starts 5 processes and keep always minimum 5 processes idle and maximum 10. It can start maximum of 150 processes. MaxConnectionsPerChild to 0 means a process never dies. It can causes memory leaks. If we set a value, it will kill the process when it has served the MaxConnections value. I would suggest changing that value to 1000 for example.

What do you think about this change? I can implement it if you want?

nupplaphil commented 4 years ago

Oh, sounds good.

Yes, plz add a PR, I'll have a look at it.

The apache specific config is loaded through this line: https://github.com/friendica/docker/blob/3c2cfeb54a297e8967674560ca080ee8a557cc23/update.sh#L21

Copy&Paste it into the editor, adapt it and replace this line.

Afterwards, execute this file per "./update.sh" to update all containers automatically.

nupplaphil commented 4 years ago

I do find this solution more docker-like and less "static" for all containers. Because which settings are fix in the docker image itself and which not? https://github.com/nextcloud/docker/issues/182#issuecomment-430531984

What do you say @valvin1

valvin1 commented 4 years ago

oh yes why not, I'll test and let you know :)

nupplaphil commented 3 years ago

@valvin1 Is this solution acceptable? :-)

nupplaphil commented 3 years ago

@valvin1 I'm closing this issue now since you're already using the docker image for your instance and it seems working.

Feel free to reopen it in case you need support again :)