I think that error 127 is due to using and repairing the tables at the same time.
Also, you'll find that running the command through the CLI will run much faster than utilizing it through a web script.
And I think it runs through the area defind in the config; I have no clue other than that though; never ran into issues like that yet
