Git Product home page Git Product logo

Comments (5)

finalls avatar finalls commented on September 22, 2024

I have the same problem.
The connector or office must update file lock but it does not happen.

X-WOPI-Override – The string REFRESH_LOCK. Required.

from officeonline.

gurarl avatar gurarl commented on September 22, 2024

Hello,
I have the same problem too.

Do you find solution or workaround?

from officeonline.

angstymeat avatar angstymeat commented on September 22, 2024

I'm seeing that the locks in the oc_officeonline_locks table are being refreshed every ten minutes, extending the lock by 30 minutes. However, the token never gets extended. When the token expires, you can't edit anymore. However, since the file is still locked, we start seeing locking errors as others try to re-open and edit the file after the token expires. Expired tokens only seems to be removed from oc_officeonline_wopi when a new token is requested. Also, it seems that a lot of the time the lock isn't removed until the original opener of the file closes the window. This causes havoc periodically for us as we end up with files that stay locked data is lost as it seems there is fighting over the locks.

Currently, my workaround is a few things:

  • I upgraded to PHP 7.4 and REFRESH_LOCK started getting called.
  • I edited lib/Db/WopiMapper.php and changed TOKEN_LIFETIME_SECONDS to a longer lifetime (I set it to 4 hours).
  • I put together a quick script that runs every 5 minutes and removes entries from oc_officeonline_locks that don't have a matching token in oc_officeonline_wopi.

So far, this allows the file to be opened long enough that it doesn't die in the middle of editing during group meetings. The 4 hour setting seems to set an upper-limit on the time the file can be opened, but because of the lock cleanup script I'm using, we don't seem to be having weird locking issues and data loss.

My edits are just a bunch of hacks to get this working in my organization. What I think needs to be done:

  • The token lifetime should be extended along with the lock lifetime when REFRESH_LOCK is called.
  • Every time oc_officeonline_locks and oc_officeonline_wopi is updated, locks should be removed when the associated token is no longer being used in the wopi table. Also, all expired tokens should be removed from the wopi table whenever the table is read or written.

I haven't had the time to try editing the app to how these changes would affect it.

Also, I take no responsibility as to whether these would work or not in your setup. I just know that since I implemented these changes a week ago, we haven't had any errors or data loss in our configuration, and that was happening almost every day before.

from officeonline.

gurarl avatar gurarl commented on September 22, 2024

Thank you.
I tried your workaround. It helped.
Now the documents do not fall off during the meeting.

from officeonline.

juliushaertl avatar juliushaertl commented on September 22, 2024

Let's track this in #155

from officeonline.

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.