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

Getting a lot of "Did not write session for ID..." #56

Closed
fredrikjahr opened this issue Apr 15, 2015 · 1 comment
Closed

Getting a lot of "Did not write session for ID..." #56

fredrikjahr opened this issue Apr 15, 2015 · 1 comment

Comments

@fredrikjahr
Copy link

Example:
Did not write session for ID 0m8vk5mqaq33dqok3sqdbfk5h1: another process took the lock.

How can I avoid this?

This is my settings:

    <redis_session>                       <!-- All options seen here are the defaults -->
        <host>127.0.0.1</host>            <!-- Specify an absolute path if using a unix socket -->
        <port>6379</port>
        <password></password>             <!-- Specify if your Redis server requires authentication -->
        <timeout>2.5</timeout>            <!-- This is the Redis connection timeout, not the locking timeout -->
        <persistent></persistent>         <!-- Specify unique string to enable persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm are known: https://github.com/nicolasff/phpredis/issues/70 -->
        <db>0</db>                        <!-- Redis database number; protection from accidental loss is improved by using a unique DB number for sessions -->
        <compression_threshold>2048</compression_threshold>  <!-- Set to 0 to disable compression (recommended when suhosin.session.encrypt=on); known bug with strings over 64k: https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/18 -->
        <compression_lib>gzip</compression_lib>              <!-- gzip, lzf, lz4 or snappy -->
        <log_level>7</log_level>               <!-- 0 (emergency: system is unusable), 4 (warning; additional information, recommended), 5 (notice: normal but significant condition), 6 (info: informational messages), 7 (debug: the most information for development/testing) -->
        <max_concurrency>6</max_concurrency>                 <!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes -->
        <break_after_frontend>5</break_after_frontend>       <!-- seconds to wait for a session lock in the frontend; not as critical as admin -->
        <break_after_adminhtml>30</break_after_adminhtml>
        <first_lifetime>600</first_lifetime>                 <!-- Lifetime of session for non-bots on the first write. 0 to disable -->
        <bot_first_lifetime>60</bot_first_lifetime>          <!-- Lifetime of session for bots on the first write. 0 to disable -->
        <bot_lifetime>7200</bot_lifetime>                    <!-- Lifetime of session for bots on subsequent writes. 0 to disable -->
        <disable_locking>0</disable_locking>                 <!-- Disable session locking entirely. -->
        <min_lifetime>60</min_lifetime>                      <!-- Set the minimum session lifetime -->
        <max_lifetime>2592000</max_lifetime>                 <!-- Set the maximum session lifetime -->
    </redis_session>    
@colinmollenhour
Copy link
Owner

Increase break_after_* or disable locking or ignore the errors if they seem to be for legitimate reasons.

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

2 participants