Comments (14)
I somehow had the feeling that it is not leantime but podman-compose. I still don't know why or how, but somehow I always end up having issues with this one component. So I deleted everything, just using podman I manually created the pod, the two containers and leantime is as fast as I would expect it. So somehow podman-compose must have screwed up something with the network. It just utilises podman itself so nothing really magical about it but still, when doing it manually, it works fine. Oh man, I'm sorry for wasting your time, thanks a lot. I hope your useful optimisations can still help someone out there.
from leantime.
this error is related to php-fpm so check the setting and change it
in /etc/php-fpm.d/www.conf or something like this
pm.max_requests = 500
from leantime.
@0xcryp70 as I said, I'm using docker based leantime, therefore the php-fpm setting you are talking about would then be inside the container. I found it inside the container under /usr/local/etc/php-fpm.d/www.conf
, it was commented out.
I don't think that I should modify files inside the container, if there isn't a var in the .env
file for that, then this is a shortcoming of the docker-leantime project.
Nevertheless, for testing purposes I quickly changed that and the setting is now active: pm.max_requests = 500
, but saw the same warning again in the logs: WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
. So I also changed that pm.max_children
from "5" to "15". Haven't seen the warning anymore, but the performance is still poor and around 10s for loading a site.
from leantime.
as you see it didn't change in the error it says pm.max_children setting (5) means = 5 ( default )
ok so in docker based meantime there is a file named custom.ini, you can add this config to this file
config/custom.ini
(https://github.com/Leantime/docker-leantime/blob/master/config/custom.ini)
or you can change it inside your container, but you need to restart your php-fpm service after that
from leantime.
I restarted the container, so basically I added pm.max_requests = 500
and restarted, still got the WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
warning. Then I updated that to 15 and restarted again, afterwards this warning disappeared but everything was still slow.
Right now, another warning came up: WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 6 total children
from leantime.
anyway, there are a lot of ways to change this config inside the container, you can add a command for search and replace the config or you can change it inside the container and commit a new image or you can add this change to the docker file and generate the new image
from leantime.
as I see you only need to optimize your nginx and PHP and there is no big deal
if you search you can see what is best for you to change
from leantime.
okay, I guess config/custom.ini
is the way to go but first I have to find out which values will increase the performance. As of now, I don't get any warnings anymore but it's simply slow, that's strange:
from leantime.
use this configs:
pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 20
pm.max_requests = 2000
you can use gzip and cache for nginx too
Enable gzip compression
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
Enable caching
proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m;
I hope these help you
from leantime.
@leonidas-o were you able to update this configuration within the docker container? How did you achieve it?
These warnings seem to be very simple to run into on a vanilla docker compose installation. Do you think we should just update the default configuration to address this issue?
from leantime.
@johncadengo I've used the config/custom.ini
on the host system (not inside the docker container).
Hmm, I fear I can't make a decision if or if not you should update the default configuration, I'm simply lacking knowledge over leantime and its behaviour with these settings and especially if other user would ran into issues with that new default settings.
from leantime.
I have the same issue. Is it possible to fix it within the docker container/compose?
from leantime.
@johncadengo I've used the
config/custom.ini
on the host system (not inside the docker container). Hmm, I fear I can't make a decision if or if not you should update the default configuration, I'm simply lacking knowledge over leantime and its behaviour with these settings and especially if other user would ran into issues with that new default settings.
Hi. Do you mind sharing how to use this file? I don't find this file in the docker compose. Is it simply to place this file on the host and mount it to config/custom.ini in the docker?
from leantime.
I created a Dockerfile to solve this problem according to the advices in above comments. I posted it here for futural references.
# Use leantime/leantime:latest as the base image
FROM leantime/leantime:latest
# Specify the working directory
WORKDIR /usr/local/etc/php/conf.d
# Update memory_limit in custom.ini
RUN sed -i 's/memory_limit = 1G/memory_limit = 5G/' custom.ini
# Add additional settings to custom.ini
RUN echo 'pm = dynamic' >> custom.ini \
&& echo 'pm.max_children = 50' >> custom.ini \
&& echo 'pm.start_servers = 10' >> custom.ini \
&& echo 'pm.min_spare_servers = 10' >> custom.ini \
&& echo 'pm.max_spare_servers = 20' >> custom.ini \
&& echo 'post_max_size = 50M' >> custom.ini \
&& echo 'upload_max_filesize = 50M' >> custom.ini
# The above settings in custom.ini does not seem to work. change php-fpm settings directly
RUN sed -i 's/^pm = .*/pm = dynamic/' /usr/local/etc/php-fpm.d/www.conf \
&& sed -i 's/^pm.max_children = .*/pm.max_children = 50/' /usr/local/etc/php-fpm.d/www.conf \
&& sed -i 's/^pm.start_servers = .*/pm.start_servers = 10/' /usr/local/etc/php-fpm.d/www.conf \
&& sed -i 's/^pm.min_spare_servers = .*/pm.min_spare_servers = 10/' /usr/local/etc/php-fpm.d/www.conf \
&& sed -i 's/^pm.max_spare_servers = .*/pm.max_spare_servers = 20/' /usr/local/etc/php-fpm.d/www.conf \
&& sed -i 's/^pm.max_requests = .*/pm.max_requests = 2000/' /usr/local/etc/php-fpm.d/www.conf
from leantime.
Related Issues (20)
- /dashboard/home stuck loading notifications HOT 2
- [BUG] Unable to log in with OIDC. Redirects back to login page. HOT 3
- Sweep: Localization missing for "headlines.welcome_to_research_board"
- [BUG] Changing IP address invalidates session
- click on task in gantt view as commentator role leads to 404 [BUG]
- [BUG] Issue with Tags in To-Do - Error 500
- [BUG] Import data from CSV file HOT 3
- [FEATURE] pull to-dos across all projects HOT 2
- [FEATURE] Add Effort as a filterable field
- [BUG] UI Bug: Alerts not scrollable HOT 4
- [FEATURE] Support for searching tickets by status type in API
- [FEATURE] Performance improvement: Don't reload whole dashboard when closing a ticket HOT 1
- [BUG] UI: No line-breaks for long markdown statements (leads to overlaying other UI elements)
- [BUG]No database connection HOT 1
- Subtask: Not able to make description on newly created
- Ability to specify Email From Name by an environment var
- [FEATURE] Links on headline on My Timesheets
- [FEATURE] Link to-dos, milestones and other objects in comments HOT 2
- [BUG] Calendar Event Drag Not working HOT 2
- [FEATURE] hardware dial, think logseq, ai notes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leantime.