I created a page sending files to my server(ssd class vps on ovh) with chunked uploading. I am using Resumable.js(https://github.com/23/resumable.js) to achieve this with the php page they have as example on their github project(https://github.com/23/resumable.js/blob/master/samples/Backend%20on%20PHP.md) to receive the data. It works but it is very very slow, according to Chrome Dev Tool the request take 5-7 seconds to be "sent" and takes another 6-8 seconds to receive the first byte.
I tried to analyse how long the php execution script takes and to my surprise microtime() shows no time passed(aka same microtime value) while executing the script.
On my vps I have a setup based on nginx running php7 with fastcgi. I made few tries and other php pages and this delay I see on chunked uploading is not visible(0.1ms as request time and 35ms TTFB).
Did someone experienced something similar and knows how to handle this? Might it be due to some ddos protection? I tried the script also with apache on the vps and saw no differences. The same script locally works like a charm. Which is what gives me lot of doubts: if nginx and apache show same problem I can suppose it is a script issue but then why locally is that faster?(same dev tool says 3ms to send request and 2ms as TTFB)