Comments (8)
By passing these environment variables to the container, I worked around the issue (now using ~300mb of ram).
- NGINX_WORKER_PROCESSES=1
- NGINX_WORKER_CONNECTIONS=1024
I'd still urge you to change the defaults tho.
from docker-documentserver.
Looking into this further reveals,
root@69ccdaf9dcd5:/# ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n
0 MB COMMAND
0.09375 MB /usr/lib/erlang/erts-5.10.4/bin/epmd
0.484375 MB bash
0.835938 MB /bin/sh
0.839844 MB /bin/sh
0.867188 MB inet_gethost
0.988281 MB awk
1.625 MB inet_gethost
2.52734 MB ps
3.10547 MB bash
3.12891 MB /usr/bin/redis-server
3.30469 MB postgres:
3.30469 MB postgres:
3.71094 MB bash
3.73047 MB postgres:
4.14453 MB nginx:
4.60156 MB postgres:
4.94531 MB nginx:
5.71875 MB postgres:
14.5273 MB /usr/bin/python
20.0703 MB /usr/lib/postgresql/9.3/bin/postgres
22.2656 MB statsd
26.4922 MB node
37.5625 MB node
37.6211 MB node
40.5391 MB /usr/bin/nodejs
45.1094 MB /usr/bin/nodejs
45.3672 MB node
49.5547 MB /usr/bin/nodejs
97.168 MB /usr/lib/erlang/erts-5.10.4/bin/beam.smp
404.887 MB nginx:
405.301 MB nginx:
405.352 MB nginx:
405.367 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
405.371 MB nginx:
root@69ccdaf9dcd5:/#
Any idea @agolybev?
from docker-documentserver.
Hi @jkaberg, thank you for report.
By default nginx run one process per each processor core inside the container. I'll think about whether this is necessary.
from docker-documentserver.
@jkaberg, we'll try testing one nginx worker per docker container by default: 990a0ab
from docker-documentserver.
This is output from one of our production servers:
$ ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n | grep nginx
0.191406 MB nginx:
0.28125 MB nginx:
15.0977 MB nginx:
15.1484 MB nginx:
16.2422 MB nginx:
16.3828 MB nginx:
I really don't know why the nginx inside your docker container uses too much memory.
from docker-documentserver.
@agolybev the output of the grep
on my server results in 24 "cores" (12 core + 12 hyperthreads)
root@89c393a54433:/# grep processor /proc/cpuinfo | wc -l
24
root@89c393a54433:/# ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n
0 MB COMMAND
0.09375 MB /usr/lib/erlang/erts-5.10.4/bin/epmd
0.835938 MB /bin/sh
0.839844 MB /bin/sh
0.9375 MB awk
0.964844 MB inet_gethost
1.57422 MB inet_gethost
2.08594 MB sort
2.48047 MB ps
3.14844 MB bash
3.25 MB postgres:
3.33984 MB /usr/bin/redis-server
3.46484 MB postgres:
3.72656 MB bash
4.19141 MB nginx:
4.51953 MB postgres:
5.18359 MB postgres:
5.34375 MB nginx:
5.78125 MB postgres:
8.55469 MB nginx:
14.5352 MB /usr/bin/python
20.0781 MB /usr/lib/postgresql/9.3/bin/postgres
23.2461 MB statsd
27.1484 MB node
38.0312 MB node
38.1289 MB node
43.0586 MB /usr/bin/nodejs
45.5156 MB /usr/bin/nodejs
47.3711 MB node
57.5117 MB /usr/bin/nodejs
96.3086 MB /usr/lib/erlang/erts-5.10.4/bin/beam.smp
That might give a hint to the high memory usage.
Btw, could you push a new image to Docker Hub? The current one is 1+month old
from docker-documentserver.
Hi @jkaberg, I cann't push new image to Docker Hub right now. It will be released in Document Server v5.0.1 in the near future.
from docker-documentserver.
In case anyone is searching, I had similar issue where the nginx process was taking up 22% of the 2GB RAM (450MB), 1 core server that I had.
Setting these in the docker-compose.yml
helped:
- NGINX_WORKER_PROCESSES=1
- NGINX_WORKER_CONNECTIONS=20
Which is fine in my case since the server will not be used by more than 3 people at the same time. This dropped my nginx RAM usage to 17MB.
from docker-documentserver.
Related Issues (20)
- Hide spaces between pages
- Feature request: Allow setting of UID and GID HOT 2
- SEQUENCE function is not working HOT 4
- watermark could not be removed HOT 2
- [Feature Request]: Do some real PDF edition
- Add CSP, HSTS and X-Content-Type-Options HOT 2
- Cannot GET /Products/Files/ HOT 2
- Comments: Not possible to mention users from different Nextcloud groups HOT 4
- failed to initialize Lua VM
- Y HOT 1
- OnlyOffice Documents cannot be opened if it exceeds 30MB, and can be opened normally if it is less than 30MB HOT 4
- HTTPS Site not starting in Docker Container onlyoffice-documentserver HOT 3
- 【feature request】dockerfile supports image building based on rpm HOT 1
- Failed to modify the document name. HOT 5
- The installation with docker-compose was unsuccessful. The last line always shows: Installing plugins, please wait..., and CPU usage is always 100% HOT 2
- Logs aren't output to stdout after log rotation HOT 3
- Conversion API add watermark HOT 2
- Support nonroot working HOT 1
- Download success,but Can't edit online HOT 1
- Can't add fonts correctly HOT 6
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 docker-documentserver.