Okay I found the problem.
I forgot to clear the input variables. So the job tried to return the entire workspace (including inputs and temporary variables) to the jobmanager.
The solution is:
clearvars -except var1 var2
where var1, var2, ... are the variables needed as an output.
