Try to raise the PHP limits upon file synchronization (see #7035)
Back port the changes from c2504021b7b3dc7f5daef8e0ffc736c2dd3e285b
Back port the changes from 0ed907b7e297b376a28a1057b7cd0639a92e93f3
Back port the changes from 40aa1084bada1af63078f624cd94d7b6fd26f013
Back port the changes from d8269c7cb85c7d78a29c5aa9c9acc03a266684f1
Back port the changes from f4f678264021ed86e9bba57854cc9346ce6a3f62