With this stats on my Gallery: Embedded Media: 9,017, really matters. As 90% of that embedded media are from youtube. And it takes very long to rebuild my thumbnail Roughly 6-8 hours for that only. and a lot of timeout errors I encounter, PHP max_execution, Nginx 504 bad gateway and Mysql Gone away errors I even raise up PHP and Nginx limits, but still I encounter some error Mysql Gone Away. A CLI mode based rebuild would be great.