Code Monkey home page Code Monkey logo

Comments (10)

AD7six avatar AD7six commented on August 15, 2024

Please add to the ticket your cache config, i.e. what is $config when it fails?

from app-template.

josegonzalez avatar josegonzalez commented on August 15, 2024

Interesting. I'll take a look at this later today, that doesnt sound like it should be happening...

from app-template.

thegallagher avatar thegallagher commented on August 15, 2024

I've also had problems using Redis to Go. I upgraded my plan to "Mini" and it fixed the problem. I also have &timeout=60 appended to my connection string. I can't remember if that was part of the fix or if I left that there accidentally while trying to fix my problems.

You're probably going to find you're having problems with your sessions next. I had to change the cache session handler.

from app-template.

josegonzalez avatar josegonzalez commented on August 15, 2024

From https://devcenter.heroku.com/articles/redistogo

Why am I hitting my connection limit with one Dyno? This is often caused by customers using the nano free plan. One connection is used by one worker, but often other connections can be made to Redis. We would recommend upgrading to our lowest plan to see if this solves the issue. Otherwise we would recommend setting a hard limit on your application code.

from app-template.

HarderWork avatar HarderWork commented on August 15, 2024

Upgraded plan to "Mini" solved the 'CacheException' error! Thanks for pointing me in that direction.
But instead I got random - but frequent - database connection problems on the web.2 dyno. I tried to set the session handler to 'cache' instead of 'php', but I guess thats what @thegallagher is talking about. Any tips and tricks on how to solve that part?

from app-template.

josegonzalez avatar josegonzalez commented on August 15, 2024

Can you paste examples of the db connection errors?

from app-template.

thegallagher avatar thegallagher commented on August 15, 2024

@HarderWork I think I had this issue too. I ended up having to append &persistent=0 to my database connection string. This made my fixed my problem but I don't think it's the right way to do it.

Setting your session handler to cache allows your sessions to be shared between the 2 web dynos. This is a separate issue which I ran into when using multiple web dynos.

I probably should have reported all of these issues but I'm usually quiet until I can provide instructions to reproduce or fix a problem.

from app-template.

HarderWork avatar HarderWork commented on August 15, 2024

@josegonzalez It's a basic app-template project, so I'm just running on pages/home. And on web.2 it gets a lot of "Cake is NOT able to connect to the database." I didn't dig deeper at the moment. @thegallagher I'm to incompetent to be quiet :)

from app-template.

thegallagher avatar thegallagher commented on August 15, 2024

@HarderWork Now I know I'm not the only one with these problems I'll be more motivated. I'm curious to know if &persistent=0 fixed your problem?

from app-template.

HarderWork avatar HarderWork commented on August 15, 2024

Now it works!

Summary

CacheException: Solved by upgrading Redis To Go from Nano to Mini ($9/month at the moment). Changing duration and timeout didn't have any effect.
Cake is NOT able to connect to the database: Solved by adding &persistent=0 to the DATABASE_URL

The only thing I changed in the app-template was to set 'cache' instead of 'php' as the default session handler in core.php. Don't know if it's relevant for this problem though.

Thanks for the help!

from app-template.

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.