• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • šŸ˜Œ This community is user driven. Be polite with other users.
    • šŸ‘‰ Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • šŸ’ø Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Can't upload large images; Internal server error

Status
Not open for further replies.

dotch

Chevereto Member
Hi, I'm on a Plesk/CentOS VPS. For a long time I've noticed I can't upload large images, from my home PC and remote url. As soon as I upload, the thumbnail is created, but uploading hangs at 0% on both my Chevereto Sites. I thought I'd solved it by not using Firefox, but now I get the same error with Google Chrome and IE as well. The error message I get is:
Code:
Error report: Server error (Internal server error)

If I enable error reporting in admin (Error log level 1), I don't get any extra information. What can be wrong? Some of my php.ini values are:

Code:
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 128M
max_execution_time = 60
max_input_time = 60

2 examples of files I can't upload:
Code:
HQ - 4248 x 2835 - 1.07 MB
HQ - 3272 x 4248 - 933 KB
HQ - 6006 x 4501 - 3,30 MB

Thanks for any help.
 
No luck yet. I do not see any extra information, although I've set php.ini display_errors = On and I've also enabled php error reporting in admin. And Debug level: print and log errors.

Where should the log file go by the way?

I've also played around with the php.ini settings:

Code:
upload_max_filesize = 20M
post_max_size = 25M
memory_limit = 256M
max_execution_time = 60
max_input_time = 60

service httpd restart

The strange thing is, I've uploaded an other large image: HQ 4394 x 2930 7,5 MB just fine with IE but NOT with Firefox. This thing drives me crazy.
 
Last edited:
Try this, upload a large image using the URL method and check what you get. If you get the image uploaded, the problem is your network which is too slow to send the data to the server.
 
Then the problem seems to be related to your server handling large images, most likely it runs out of ram. How many ram is allocated for PHP?
 
Had exactly the same issue on Plesk/CentOS. Had to increase memory allowed for PHP up to 300M until this issue resolved.
 
Having same issue here uploading large size image, looks like 128MB RAM is not enough...

(url upload also not working)

same config, 2GB RAM working, 128MB RAM not working.

Looks like serious problem what PHP doing required much RAM. I think its processing problem (i dont use Exif & watermark)

File i tried too upload: 7.38 MB 7019x5100 pixels
 
Last edited:
On the demo website I use 128MB RAM + 30s max. execution time + 20MB (max upload size + max post size) and I'm able to upload large images (here is an example). Sadly, this kind of issues are loosely related to the script itself and it depends on things like:
  • Server hardware (CPU, RAM, etc)
  • Network
  • Server libraries (in this case GD Library)
  • Server limitations (forced limitations)
My advice for those who have issues like this is that you will need to debug your server and try to figure out what is going on using tools like htop. At my end I can't do that much guys because each server is something different and fixes that works in one machine maybe won't work in another one.
 
If you have already narrowed down to RAM then that's the problem, why try another workaround?

You should know that some files just require more resources to compute (re-sizing and all that stuff). By lowering down the RAM on the local server I got this:

Code:
[09-Jan-2016 23:33:41 America/Santiago] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 28076 bytes) in C:\wamp\www\app\lib\classes\class.imageresize.php on line 222


That error is is related to the imagecreatefromjpeg PHP GD function.

Bottom line is that you can't expect to handle a 7.32MB file with just 128MB RAM when running PHP, it won't happen. You need to increase the memory limit or just don't allow images bigger than 5 MB. Perhaps you may think that the code should be written better to try to workaround this or to detect how much memory it will use, sadly there isn't a way to do that.
 
Last edited:
HereĀ“s my settings. And I can confirm that a 25MB large image works.

Max. upload size 32 MB
Max. post size 32 MB
Max. execution time 120 seconds
Memory limit 256 MB

I have seen some problems with panoramic images. I have one JPG (23000 x 2144) it's only 3.6MB but nothing happens when you browse and select it. 1 cm of white is added to the bottom of the upload screen upload screen but no upload button or icon appears. Tested on demo.chevereto.com and same problem there. Nothing shows in my error log.
Maybe I should file this under "Bug report"

The image is here, for testing purposes: http://zimg.se/panorama.jpg
 
Last edited:
Status
Not open for further replies.
Back
Top