Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
106 views
in Technique[技术] by (71.8m points)

php - Symfony - FOSRestBundle - Allowed memory usage

I am using the bundle FOSRestBundle with Symfony to generate big feeds (1000000 items) and i have a problem of memory.

The code looks like this :

        $responseView = new ResponseView();
        $data = [];
        foreach ($items as $item) {
            $data[] = $this->adMapper->getViewData($item, $conf); // Memory error
        }
        $responseView->setCode(Response::HTTP_OK);
        $responseView->setMessage('OK');
        $responseView->setData($data);

        return View::create($responseView, $responseView->getCode());

Is there a solution to create big feeds please ? Is this bundle appropriated to this use case please ?

question from:https://stackoverflow.com/questions/66047934/symfony-fosrestbundle-allowed-memory-usage

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...