I have tried multiple times to run the rebuild resizes and thumbnails job from within my embedded Gallery2.
However, everytime I have seen that this job simply freezes and refreshing the browser does nothing!
I have since found a workaround: run these jobs by going directly to the Gallery2 installation and not from within the Drupal embedded interface.
Hence, if you site is on www.example.com and your Gallery2 installation is on gallery2.example.com, go to gallery2.example.com/main.php instead of www.example.com/gallery/index.php?q=gallery
On running these jobs directly from the Gallery2 interface itself, I faced no issues with rebuilding the resizes/thumbnails. It is faster and more responsive. Also, if the job does freeze a simple refresh of the browser gets it going again!
Maybe this si something that can be looked at by the Gallery module project.
Regards,
KH