Laravel-snappy: Strange timeout with assets

Created on 4 Oct 2017  路  3Comments  路  Source: barryvdh/laravel-snappy

USING :

  • Laravel Framework V 5.4.*
  • Laravel Collective V 5.2.0
  • Snappy V 0.4.0

- WKHTMLTOPDF (Last version on the net)

ISSUE :
I'm getting an issue when i try to PDF::loadView() with CSS or JS or IMG assets.
This is the base of my HTML file : https://i.imgur.com/seCjRm2.png
Also tried with : https://i.imgur.com/gsKJ1UP.png
And with : https://i.imgur.com/0mHQr3w.png
It all results the same : TIMEOUT.

The only CSS rendering properly without timeout is
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />

When i try to render the view, everything is perfect, but when i Load the view to a PDF it timeouts. If I remove all assets, everything is ok though.

Another strange issue is that I tried to config 36000 secs (which is ten hours) and at the very end of the timeout the PDF file saved :thinking: (launched it at 17:32, and file saved at 03:32)

Any idea, i'm on it for hours now and i can't figure out how to solve it...

Most helpful comment

Yeah php artisan serve (or the php cli server) can only handle 1 concurrent request, so you cannot request image urls while processing the other URL.

All 3 comments

Ok, so I found out why it was timing out. It's because I was running it under php artisan serv.
After a deployment on IIS, everything is fine. Can't explain why it saved the file just before the 10 hours timeout tho.
Note to everybody : Do not run it under php artisan serv it's useless for most of the complicated views

Yeah php artisan serve (or the php cli server) can only handle 1 concurrent request, so you cannot request image urls while processing the other URL.

Yep, but it works for very simple views, even on php artisan serv :/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joaomlopes picture joaomlopes  路  3Comments

leonardosapiras picture leonardosapiras  路  3Comments

hilmanfaiz picture hilmanfaiz  路  5Comments

samsoft00 picture samsoft00  路  3Comments

ghost picture ghost  路  3Comments