Thursday, 15 August 2013

php - Laravel Mailer - maximum memory limit exceeded? -



php - Laravel Mailer - maximum memory limit exceeded? -

i'm trying laravel app send me email whenever there's error in production. goes:

app::error(function(exception $exception, $code) { if (app::environment('local')) { // not testing on prod, duh event::fire('error.production', [$exception, $code]); homecoming view::make('error.default'); } });

that 'error.production' event goes error handler sends email:

public function handle($exception, $code) { $result = $this->mailer ->setview('emails.error.production') ->setsubject('production error') ->settoaddress('me@myself.com') ->settoname('patricksaysi') ->setdata(['exception' => $exception, 'code' => $code]) ->send(); homecoming $result; }

the email sends, execution cycle never completes extent it's able display error screen user. because error occurring when send email - allowed memory size of 536870912 bytes exhausted (tried allocate 532414464 bytes).

i've set breakpoint on return $result line in handle() function above, , never reached. i've tried stepping through swiftmailer "send" cycle, , can it's gigantic , takes forever , learned nil it, other it's maybe candidate cause of memory allocation error. i'm running on laravel homestead in theory environment should optimal. it's simple email / view, spits out error body , code. ideas going wrong? there improve way accomplish i'm trying here?

php email laravel exception-handling vagrant

No comments:

Post a Comment