Uploaded image for project: 'Lucee Development'
  1. LDEV-1318

Load balanced clustered sessions not working correctly

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.2.1.5
    • Fix Version/s: 5.2.2.71
    • Labels:
    • Environment:

      Lucee running in a docker container on linux with an nginx front end load balancing connections

      Description

      This has been seen in the released 5.2.1.9 and also an upgraded to 5.2.2.5 snapshot. (I've selected 5.2.1.5 for this ticket because it wouldn't let me enter the released version I'm running)

      When running sessions in a database with a load balanced docker environment, session variables set in one container are not seen in the other container.

      Setting this.sessionCluster to either true or false doesn't seem to have an affect.

      I have the attached app running in two containers. My nginx is set to round-robin load balance via upstream and proxy_pass.

      An environmental variable is passed into the containers so that the code knows which container is running.

      The code checks for it's own session variable, if it doesn't exist it creates it.

      On first run the session is created and container 1 sets it's variable. The page displays showing the variable exists.

      On second run container 2 processes the request and sets it's variable. The page displays showing that both variables exist.

      On the third run container 1 processes the request. No variables are set. The page displays showing only 1 variable set; container 1's.

      On the fourth run, container 2 processes the request, no variables are set. The page displays showing both variables set.

      Continuously refreshing now toggles whether 1 or 2 variables are set dependant on which container is processing the request.

      It is expected that at this point all requests should show the same.

      This makes me think that this.sessionCluster command is always false.

      Decoding the base64 value from the sessions table it appears that there is only one variable set.

      This does not happen in the 5.1.4.19 version.

        Attachments

          Activity

            People

            • Assignee:
              pothys-mitrahsoft Pothys - MitrahSoft
              Reporter:
              jedihomer Jedihomer Townend
            • Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: