You probably need to put the first three line inside a ParallelEvaluate (so every kernel has its own WebUnit loaded).
(I haven't tried this though)