Internal server error uploading small jpegs

Carnbot / 2018-06-29 09:54:41   

I'm getting constant errors uploading small jpegs.

I thought they were too large and reduced them down but that didn't solve the issue. they are around 150k each. Some seem to upload fine but lots of others fail each time. From looking at the folders, they are uploading the main image but the conversion for thumbnails seems to be what's failing.

I emailed my hosting provider and they said I've been getting errors such as:

Premature end of script headers: index.php

Anything I can do to resolve this?
Many thanks :)

Carnbot / 2018-06-29 09:56:48   

Also one of the server errors was:

SystemException in API_Linux.cpp:172: setuid() failed: Resource temporarily unavailable

Not sure if that's useful info.

Vaska A / 2018-06-29 14:15:16   

I get the feeling that your webhost has an under powered server.

That right there is why we always wanted people to keep their images appropriate sizes. But, you should be able to do more than 150k.

Carnbot / 2018-07-02 15:07:38   

Thanks, it just seems strange that it's fine with some images and not others when they are the same size. I'll try and troubleshoot some more......

Vaska A / 2018-07-02 16:36:00   

The server seems to be unstable - there are probably another 150 sites on the same server/database.

Vaska A / 2018-07-03 23:54:38   

I'm curious if you are running on PHP7.

Carnbot / 2018-07-10 13:58:32   

Hi, No it's running on 5.6

Should I upgrade to 7? It seems possible by the host but I can't configure that correctly at the moment. They require me to add a line to the htaccess file for it to work and it breaks the site if I do.

Vaska A / 2018-07-10 18:46:46   

That shouldn't break the site...something else is wrong if that happens.

PHP7 is better with memory - it might alleviate the problem Otherwise, there isn't much that can be done - the server is probably oversold (which is very common).

Carnbot / 2018-07-11 15:52:39   

Hi, it seems I have found a workaround for uploading.
PHP7 didn't help after changing so I went back to 5.6.

But what I have found is that problem images are not the jpeg 150K packed size but the final opened image size, so even if a jpeg is 60k in file size if the opened image (if viewed in Photoshop) is approx over 4.2mb after expanding it won't upload to the server. So for example 1920x1080 images are larger than this and fail even if 150k filesize but a cropped 1920x720 uploads ok.

It's going to be important in the future to upload even higher quality images as 1920x1080 isn't that large anymore on high definition monitors

I guess I should have mentioned this before, but I thought it was the upload file size which was the issue :)

I didn't realise there was this restriction, is this still a server or indexhibit restriction? If this is still a server issue it makes sense. But I changed the max file sizes in indexhibit to allow higher resolutions and file sizes. if the server is not allowing me to open larger images I guess I need to change the server....

Vaska A / 2018-07-11 16:24:00   

It's a restriction on both - you can change the Indexhibit restriction to anything you want but on the server you can not.

Sadly, it's a serious problem for shared webhosts - and it becomes a problem for Indexhibit. I am testing a new image library but it's not going to solve the problems 100% of the time - some servers still have problems (because they are oversold and not very powerful).

Carnbot / 2018-07-11 17:02:18   

Ok thanks, I'll see what my webhost says about this restriction. The new image library sounds promising.

This thread has been closed, thank you.