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

Limit memory usage #67

Open
forceedge01 opened this issue Oct 11, 2017 · 2 comments
Open

Limit memory usage #67

forceedge01 opened this issue Oct 11, 2017 · 2 comments

Comments

@forceedge01
Copy link
Owner

We're hitting memory limit issues on mac os x behat 2.5 and behat 3.0 when using the sql extension with over 6000 steps and PHP memory limit of 384 mb.

Ideas on how to solve this problem from the sql extensions perspective.

Reduce the memory footprint by:

  • Make the SQLHistory object optional. Don't record history if not provided.
  • Documenting that the local keystore can be replaced by a solution that stores keys externally such as Redis keystore.

This needs to be applied on both 2.5.x and 3.x versions.

@forceedge01
Copy link
Owner Author

Also consider removing duplicate entries in the keystore, at the moment we get this stored:

[db.table.column] => value
[db.table_column] => value

@forceedge01
Copy link
Owner Author

forceedge01 commented Oct 12, 2017

Also need this in place after initialising PDO connection:

$this->connection->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant