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

[maintenance] - Store sessions in database instead of files #863

Open
wants to merge 3 commits into
base: 1.12
Choose a base branch
from

Conversation

Ferror
Copy link
Contributor

@Ferror Ferror commented Nov 1, 2022

Based on Symfony Docs:

https://symfony.com/doc/current/session/database.html#store-sessions-in-a-relational-database-mariadb-mysql-postgresql

Storing sessions in files, especially locally prevents us from scaling Sylius because it is additional calls to the file system that is shared between multiple machines. Ideally we would like to store session in Redis or other Key-Value database but to no add additional service to our stack we keep it simple - in database.

@Ferror Ferror requested a review from a team as a code owner November 1, 2022 19:41
@probot-autolabeler probot-autolabeler bot added the Docker Docker-related issues and PRs. label Nov 1, 2022
public function up(Schema $schema): void
{
$sql = <<<SQL
CREATE TABLE sessions (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need some config like this?

doctrine:
    dbal:
        connections:
            default:
                schema_filter: ~^(?! sessions)~

@Ferror Ferror requested a review from lchrusciel September 7, 2023 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker-related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants