Im using Laravel 4.1 with Homestead and just implemented a image upload using the intervention\image package. I have used this packaged before although it's the first time using it with Homestead.
So the upload time of images with around 2Mb on a local machine is huge, and this never happened while i was using other VM setups (Vaprobash). On the first try I got a '413 Request Entity Too Large' so I changed the 'client_max_body_size' to '20m'.
Anyone knows how to make this faster or it is just to me that this is happening?
Is it stopping at PHP or Nginx? Try looking at the PHP settings as well like post_max_size, upload_max_filesize and memory_limit. Maybe execution time as well, depends if it's timing out after that.
I already changed those values and its not timing out. The thing is when i used the Vaprobash Vagrant file (with apache) this kind of uploads were almost instantaneous and now using Homestead they are taking 10 to 30 seconds.
Yeah I start to think that was well, because even 200KB images are taking 5 to 10 seconds.
But since I'm using the most of standards Homestead config ( followed every step in the videos here) i thought it would be fine for such a simple app like this one.
Well I will have to investigate more
Maybe it's something to do with this particular setup you've got. Filesystem syncing between them both seems like the possible cause if Nginx/PHP is setup okay.
Really can't find a solution for this. It really is just me having this problem? Everyone else can upload files/images without a problem using Homestead?
Maybe a little offtopic, but we have similar vagrant problems.
If your Host OS is Windows, then it is probably the cause.
Syncing is extremely slow and causing "kernal thread" load because of syscalls which php-fpm makes during lifecycle of request. High CPU usage in VM and x10-xN slower response time. Big symfony2 project could take ~60 seconds without any caching to serve a request.
However in our case there was almost no difference between a request serving just a simple static blade , submitting a form or whatever (file uploads are not tested)
My Host OS is OS X 10.9.5 @drekinov, and it is really strange because it just happen when using Homestead, if i switch to Vaprobash everything works just fine