-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File upload triggers exceptions #938
Comments
That's a weird one. This happens during the actual upload process? Nginx it appears? What file are you uploading? Can you provide me a sample file I can test with? |
Can you check the |
In the meantime I suggest uploading files manually via ftp or something. |
@w00fz not sure how can I do that, could you please advise?
|
Yah I can reproduce with my own PNG file. Looks like it's a PNG issue. |
@w00fz What helped me is removing the |
How big in size is the image you are trying to upload and fails? |
Average size is 50-60 KB, I was uploading 31 images |
31 images at the same time? does it happen when you do them individually? BTW, your error above led me to this: http://serverfault.com/questions/511789/nginx-client-request-body-is-buffered-to-a-temporary-file can you increase your client_body_buffer_size? http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size ? |
I raised it to 1M and did not help |
This fixes the problem and restores the website:
|
yes, i was able to reproduce the exact error on my raspberry pi with PHP7 and nginx+php-fpm. It was not while uploading, it was while deleting a bunch of files via the admin. it happened randomly, like part of the filename was lost, and it renamed the folder The only problem is that I only got it twice and can't get it to happen again for some reason. I'll keep trying this weekend though and digging in a bit further. |
Fixed via admin. |
awesome, thanks a lot |
@gszathmari indeed your solution works! A BIG thank you! In our Linux configuration (BlueOnyx) the site storage allocation and the "user" allocation is entirely different and as there is no database in grav, my user was clocking up data for backups etc. |
I just upgraded to
1.1.0
and media uploads seems to trigger a few exceptions. This brings the whole site down (my visitors get HTTP 500) until I remove thecache/compiled/files
file manually.The weird thing is that
files
is an actual file when I get the 500 error, but in other cases it is a directory. I think something createsfiles
as a file, thusmkdir files
raises and exception somewhere.Logs from my
error.log
2016/07/15 20:02:39 [warn] 15056#15056: *23 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000018, client: 115.187.195.164, server: privacyforjournalists.org.au, request: "POST /admin/media/guides/encrypt-your-hard-drive-with-bitlocker-windows.json/task:addmedia HTTP/1.1", host: "privacyforjournalists.org.au", referrer: "https://privacyforjournalists.org.au/admin/pages/guides/encrypt-your-hard-drive-with-bitlocker-windows"
2016/07/15 20:02:39 [error] 15056#15056: *23 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Creating directory '/var/www/privacyforjournalists.org.au/html/cache//compiled/files' failed on error mkdir(): File exists' in /var/www/privacyforjournalists.org.au/html/vendor/rockettheme/toolbox/File/src/File.php:420
The text was updated successfully, but these errors were encountered: