• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Session Sharing between Redis and CF2021 container.

New Here ,
Oct 06, 2022 Oct 06, 2022

Copy link to clipboard

Copied

Hello,

We are having some issues sharing sessions between Redis and CF2021 container. 

Is there any trouble shooting guide? or anyone has any suggestions?

Regards

Views

253

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2022 Oct 06, 2022

Copy link to clipboard

Copied

What's in the logs?

 

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2022 Oct 06, 2022

Copy link to clipboard

Copied

No guide, sadly. There are too many variables that can affect things, really. You can help us help you, though.

 

First, are you saying the problem happens ONLY when running CF as a container? Or can you confirm if the problem happens for you also if running CF as a normal process/installer? (Or have you only tried in a container?) And are you using the Adobe CF 2021 image? or the one from Commandbox?

 

Second, where is the redis relative to your CF? And is redis running as container also, if "local" to your CF container? Either way, are they in the same network? 

 

Third, what problem are you having? Are you getting a message? Is it intermittent or not working at all? Might it be that data is failing to persist appropriately, such as over restarts?

 

Or might it be failing only when trying to store only certain data? I helped a client who had a problem with using certain java objects stored in a session, where their serialization didn't work. (I just checked and they've not yet filed that bug report with the details.)

 

Maybe someone else may offer still other ideas or questions. The feature does and should work. When it doesn't, there's an explanation, which simply needs to be discovered.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 09, 2023 Jun 09, 2023

Copy link to clipboard

Copied

LATEST

1. Yes, my issue happens only when CF is running in a docker container. 

2. Redis is also running in a container. Both Redis and CF have networks: default in docker-compose.yml.

 

redis:

  networks:

   - default

3. Session something does not exist.

 

This application has a lot of objects stored in session. Perhaps, this is my problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 06, 2022 Dec 06, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 25, 2023 Feb 25, 2023

Copy link to clipboard

Copied

We have found that storing CF components in the session causes problems as ACF is unable to deserialize the component after receiving the session object from Redis.  I am not sure if that is the same issue Charlie Arehart was talking about when he refered to "certain Java objects", but we worked around it by not storing the object in the session, but rather stored all instance varaibles for the object in a struct in the session and get a new instance of the object in any request that needs it.  That may introduce a bit more overhead when the object is needed, but allowing us to autoscale our app and eliminate sticky sessions is worth it in our case.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 09, 2023 Jun 09, 2023

Copy link to clipboard

Copied

There are a lot of objects stored in the session. Maybe, this is my issue as well. Thanks for the response.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation