2

I am trying to clean the cache of my application

But once I run the

php console cache:clear --env=prod -vvv

It stays running... The application in the webserver alos stop responding.

I tried to add -vvv but it doesn't show any comments.

At the end I always have to stop the process by tapping Ctrl C

What could be? How could I debug that?

One additional question: how long normally it should take to clean the cache?

5
  • Did you check how big is you /var/cache/prod directory? Also you could try with --no-warmup option. Maybe it's warming up the cache taking so long. Commented Sep 16, 2016 at 10:34
  • 1
    you can manually dump it with rm -rf /var/cache/prod/* (be careful) and then warm it back up with php bin/console cache:warmup. This isn't going to tell you what's wrong, but it may give you insight as if to wether it's hanging on warmup or not. Commented Sep 16, 2016 at 11:03
  • Seems like I saw the exact same question yesterday. This sort of thing can happen if you change some classes such as commands such that the portions that were cached no longer match the actual class. In which case removing the actual cache directory is pretty much your only solution. Looks like the question from yesterday disappeared. Almost like someone deleted it then maybe asked it again. Commented Sep 16, 2016 at 12:15
  • @dragoste The cache has 36MB in the prod and 16MB in the dev. But it seems that not doing warmup is working Commented Sep 16, 2016 at 12:50
  • Check that the user that you use when you run the command has the access to Read & Write on the cache folder Commented Nov 29, 2016 at 9:53

1 Answer 1

1

I discovered what it was.

I was using the smallest type of instance of the Amazon servers.

Apparently this command used too much memory and system started to collapse.

After some days the server simply stopped because of lack of memory when I was doing this command. I changed the instance to a bigger one and the problem never appeared again.

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.