3

We are moving out site from single dedicated server to AWS. AS part of the AWS implementation we will be using a load balancer across multiple web hosts (to a single DB). In order to support this configuration we need to move from file based session data to DB but in testing this breaks the site.

The process we are testing is to change local.xml to DB session and then clearing session/cache of server. Going to the site root works, but as soon as you try logging in or go through checkout you are prompted with the Magento installation screen?!? Same happens when you go to the admin page.

So, it appears that it's working for HTTP but not HTTPS? Also noticed that no cache is being created in var - the cache folder is created but no subfolder/files. Permissions are 777 on var.

Any help appreciated.

  • It sounds like sessions just being a small part of the issue. Do all files have the right owners and permissions? – Sander Mangel Dec 2 '14 at 11:41
  • If I change it back to [files] and clear down sessions/cache then it all works again. Nothing get's written to the core_session table in the DB - I assume this is where the sessions should be stored? – Greg Moseley Dec 2 '14 at 12:08
  • What version of Magento? – brentwpeterson Dec 2 '14 at 16:17
3

We are moving out site from single dedicated server to AWS

I'm sorry to hear that.

In order to support this configuration we need to move from file based session data to DB

Not quite. You need to move to a distributed session store, not necessarily database driven sessions. This will be one if many things you'll need to address when running a distributed architecture.

Using MySQL for session storage is not a good idea, it's not designed for this purpose, thankfully there are excellent alternatives.

Redis is the perfect choice, it's native to newer releases and pluggable via Cm_RedisSession in older releases.

This is what you need, https://github.com/colinmollenhour/Cm_RedisSession

After install and configuration, be sure to flush the config cache and you'll be good to go.

Also noticed that no cache is being created in var

Cm_Cache_Backend_Redis to the rescue, https://github.com/colinmollenhour/Cm_Cache_Backend_Redis


Then once you've figured out cache storage and session access, you'll have to address shared media storage, deployment, monitoring, software versioning, automation, fail over, SPOF analysis and much more.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.