Git Product home page Git Product logo

Comments (5)

bnhf avatar bnhf commented on August 28, 2024

@karabelnikov

Greetings!

This is actually more of a Docker issue, but clearly something we want to figure out. This article appears to be on point with a fix involving setting up log rotation for Docker. Looks fairly straightforward:

https://www.howtogeek.com/devops/how-to-clear-logs-of-running-docker-containers/

screenshot-www howtogeek com-2023 05 09-07_19_58

from openvpn-admin-plus.

karabelnikov avatar karabelnikov commented on August 28, 2024

@bnhf

I figured out the problem and how to solve it!

Problem: The log size of the "openvpn-web-gui" container is constantly increasing.

Reason: there is a meta tag in the code of the main page:

<meta http-equiv="refresh" content="XX">

I have it for 10 seconds, you seem to have 60 seconds by default. If you do not log in to the web interface, the log size will not increase. If you go to the web interface and leave the tab open, then every XX seconds the docker writes the main page data to the log file. That is, every XX seconds of page refresh, information is written to the log file and it increases in size (information from the main page).

Solution: add docker-compose.yml to the file of your Stacks the following code:

logging:
      driver: "json-file"
      options:
        max-size: "100k"

Firstly, you install the logging driver as a "json-file", secondly, limit the size of the log file to max 100 KB. When the max size is reached, the file is reset to zero and starts recording information again.

And then restart your Stack in Portainer.io via the "Update the stack" button.

The solution suggested Scott is the same, but it only works for newly created containers. And for existing content, the logging rule is /etc/docker/daemon.json does not work.

Снимок экрана 2023-05-09 204858

from openvpn-admin-plus.

karabelnikov avatar karabelnikov commented on August 28, 2024

@bnhf

I suggest updating docker-compose.yml file in the repository so that by default the log file does not exceed 100 kb. Auto-updating of the page is a necessary function, but over time it can lead to an increase in the size of the log to such a size that if the ROM of the virtual machine is small, the server will stop working.

I suggested PR.

from openvpn-admin-plus.

bnhf avatar bnhf commented on August 28, 2024

@karabelnikov

Nice work my friend! This is a good solution, and I agree it should be incorporated into the standard/recommended docker-compose.yml. I recently started running my own OpenVPN Server in a Proxmox VM that has fewer resources than my previous bare-metal host, so this issue would have caught-up with me soon -- thanks for sorting it out before that happened. :-)

from openvpn-admin-plus.

karabelnikov avatar karabelnikov commented on August 28, 2024

@bnhf

Thank You, Friend. Always in touch! I have a project that was put into production on a VMware ESXi hypervisor for 13 people. A small company. For me, this is the main tool for secure remote access.

We will continue to monitor the progress of the work further. I'm closing the assignment.

from openvpn-admin-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.