Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown LibreOffice when idle #1023

Open
nh2 opened this issue Oct 17, 2024 · 3 comments
Open

Shutdown LibreOffice when idle #1023

nh2 opened this issue Oct 17, 2024 · 3 comments
Labels

Comments

@nh2
Copy link

nh2 commented Oct 17, 2024

Small feature request:

Currently, a started libreoffice/program/soffice.bin --headless seems to linger forever.

On smaller servers that only sometimes process documents, this consumes a lot of RAM unnecessarily (e.g. 800 MB for an XLS I tested with).

It would be great if we could have a timeout for that being shut down.

Thanks!

@gulien
Copy link
Collaborator

gulien commented Oct 17, 2024

The feature is actually not that obvious to implement 🤔

Note for myself:

Maybe a ticker here the mutex:

func (s *processSupervisor) Launch() error {
s.logger.Debug("start process")
err := s.process.Start(s.logger)
if err != nil {
return fmt.Errorf("start process: %w", err)
}
s.firstStart.Store(true)
s.logger.Debug("process successfully started")
return nil
}

There is a risk that we may shutdown a process but then restart right away as a request is in the queue.
Also, reset the reqCounter to 0 after an idle shutdown?


On a side note, I suspect LO will take the more RAM the more is available. On the demo instance (500MB), an idle LO does not take as much RAM (i.e., < to 500MB). It may depend on the files' size though.

@gulien gulien added enhancement New feature or request chromium libreoffice labels Oct 17, 2024
@nh2
Copy link
Author

nh2 commented Oct 24, 2024

@gulien FYI I reported the above spam bot to Github just now (can be done on its profile page).

@nh2
Copy link
Author

nh2 commented Oct 28, 2024

And another spambot, I reported that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
@nh2 @gulien and others