I found out it is not php-fpm process issue.. with sqlsrv_connect('TraceOn'=>1)
Statement = 0x558884b11f70
SQL = [UPDATE #mdl_backup_files_temp SET newcontextid = '96',newitemid = '0' WHERE id = '748'][length = 86 (SQL_NTS)]
this line is when sqlsrv.so (v4.3.0) stopped the whole process.
Reading from google, they believed it was a deadlock ...
Does anyone know the solution?
when we had php5.4 we were running it with freetds which was all good, but php7.0 does not support freetds.