Skip to content
Advertisement

Upload data to Apache server keep failing if uploading lasts more than 20 sec

I have a website where users can upload images to my hosting Apache/PHP server. If files uploading lasts less than 20 sec everything is fine. But if it lasts more (no matter what image filesize is), upload fails.

In .htaccess I already have:

php_value upload_max_filesize 10M
php_value post_max_size 70M
php_value max_execution_time 180
php_value max_input_time 180

And in php script, returng result of:

echo "-max_execution_time  ".ini_get('max_execution_time');
echo "-max_input_time ".ini_get('max_input_time');
echo "-upload_max_filesize  ".ini_get('upload_max_filesize');
echo "-post_max_size  ".ini_get('post_max_size');
echo "-memory_limit   ".ini_get('memory_limit');

is as excepted:

-max_execution_time  180

-max_input_time 180

-upload_max_filesize  10M

-post_max_size  70M

-memory_limit   128M

These are requests – all failed after 22sec with error net::ERR_SPDY_PROTOCOL_ERROR (in firefox they fail after 20sec)

https://cdn1.imggmi.com/uploads/2019/5/8/fadd31a1a22674cfc3cc4603c97762ff-full.jpg

console log

What I am missing here??? Once again, if uploading duration is less than 20 sec – everything is fine…

Advertisement

Answer

It was server problem due shared hosting and I had to contact hosting support…eventually they did some server reconfig and now upload does not break so early…thanks to @m908070 cheers

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement