[admin plugin] 500 error on page media listing,

Hey,

I have a Grav installation (with admin plugin) setup locally (localhost mamp installation) and on a remote server. Both have php 5.6+ installed and have a upload_max_filesize and post_max_size limit up to 128mb.

When I try to upload a big image of 2MB size using page media in the admin section, the upload itself succeeds, but when I try to save the page (and everytime when I load this page) I get an error:

"Fetch Failed: Unexpected end of JSON input
Unexpected token < in JSON at position 0"

This only happens on the remote server. When I do this with the same image on my localhost, it works fine.

I’ve been searching with the inspector what exactly goes wrong, and found this:

In the console it throws a 500 server error when it tries to load this file:

.../grav/admin/media/home/_mypage.json/task:listmedia/admin-nonce:c0c8 aa0433082ff254452d221461986c

Therefore I went looking into my server log what might cause this error and found this:

[Thu Aug 04 16:03:58 2016] [error] [client ] (104)Connection reset by peer: FastCGI: comm with server " /var/www/cgi-bin/php5-www.bringme.com-fcgi" aborted: read failed, referer: http://bringme.com/grav/admin
[Thu Aug 04 16:03:58 2016] [error] [client ] FastCGI: incomplete headers (0 bytes) received from server "/var/www/cgi-bin/php5-www.bringme.com-fcgi", referer: http://bringme.com/grav/admin

I don’t really know what this means. Does it might have something to do with a connection time-out?

Again, this only happens with the big image file. When I use smaller images, the error does not occur. Ideally, it should be possible for my site admins to be able to upload images up to 2MB (it’s not that big after all…), or is there a max filesize or something? Do I have to change something on my remote server?

Thanks for the help in advance! :slight_smile:

Hmm. can’t replicate this myself, please create an issue here: https://github.com/getgrav/grav-plugin-admin/issues