Martin-
Martin-

Reputation: 927

When loading a fixture ends with "Killed"

In my local envoriment I can find load all my fixtures.

But on my staging server, one of the fixtures just ends with "Killed"

I grep'ed through my whole project for the word "Killed" but did not find it anywhere.

php bin/console doctrine:fixures:load --fixtures src/ReviewBundle/DataFixtures/ORM/LoadRatingTypes.php -vvv
Careful, database will be purged. Do you want to continue y/N ?y
  > purging database
  > loading ReviewBundle\DataFixtures\ORM\LoadRatingTypes
Killed

I tail my dev.log file and all I got was

[2016-03-17 15:26:54] doctrine.DEBUG: "START TRANSACTION" [] []
[2016-03-17 15:26:54] doctrine.DEBUG: DELETE FROM cms_block [] []
[2016-03-17 15:26:54] doctrine.DEBUG: DELETE FROM cms_page [] []
[2016-03-17 15:26:54] doctrine.DEBUG: DELETE FROM rating_type [] []

I have no idea where I should look

Upvotes: 0

Views: 649

Answers (1)

Terenoth
Terenoth

Reputation: 2598

"Killed" often happens when PHP runs out of memory, and shuts down your fixture process. This happens mainly when your PHP script tries to load too many entities. Are you trying to load a massive number of fixtures?

There are workarounds to avoid memory overflows in your fixtures scripts. I answered a pretty similar question some weeks ago, you should have a look at it.

If you still have problems after implementing these modifications, you could also increase PHP memory limit.

Upvotes: 1

Related Questions