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

Lock dont get released after script is done #9

Open
rolfos opened this issue Oct 31, 2018 · 4 comments
Open

Lock dont get released after script is done #9

rolfos opened this issue Oct 31, 2018 · 4 comments

Comments

@rolfos
Copy link

rolfos commented Oct 31, 2018

There should be a destructor in RedisLockStrategy.php to release the lock otherwise it takes the full ttl time until lock is released (maybe not in every case, i encounter this issue with redirects).

    /**
     * Destructor:
     * Releases lock automatically when instance is destroyed and release resources
     */
    public function __destruct()
    {
        $this->release();
    }
@hannesbochmann
Copy link

hannesbochmann commented Mar 18, 2019

I encounter this problem in some projects, too. It happens when a page of type shortcut is requested with a speaking URL. In this case it takes TTL for TYPO3 to create a response because of the blocked locking. Adding the destructor solves the problem. It would be great if you could add that and make a new tag.

Until this fix is applied the attached patch can be used for version 3.0.1 It can be applied easily for example via composer.

patch.txt

@derflocki
Copy link

We have run into terrible issues due to the missing destructor/release when the rendering is stopped due to e.g.: TSFE->pageNotFoundAndExit()

@markusmuellerw
Copy link

Same here... It's also problematic while debugging. When "stopping" (terminating) the request while a debug-session, the pagegeneration-lock stays and the next request have to wait the whole rest of the ttl.

@dkoether
Copy link

Same here, we've implemented the patch and it works so far. Thank you!

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

No branches or pull requests

5 participants