1

On server i am trying clear cache but after run this command (php bin/console cache:clear --env=prod) a get error:

[Doctrine\DBAL\Exception\ConnectionException] An exception occured in driver: SQLSTATE[HY000] [2002] Connection timed out

[Doctrine\DBAL\Driver\PDOException] SQLSTATE[HY000] [2002] Connection timed out

[PDOException] SQLSTATE[HY000] [2002] Connection timed out

Database credentials are in parameters.yaml and connection to db is working... Whole web is working...

Can anybody give me some hints/direction? Thx.

1
  • 1
    Is it possible that you store some cache in a database using another configuration than the one in the parameters file ? Try running the clear cache command with -vvv option in order to see which file try to connect to the db Commented May 4, 2018 at 13:23

1 Answer 1

1

Try deleting the cache manually, see if that solves the issue.It should be

rm -rf var/cache/prod

Also try connecting to the database from your prod, through console to make sure there is nothing wrong with connectivity. Thanks!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.