I have solved it by removing the cache:
rm -rf var/cache var/log var/page_cache var/view_preprocessed