An internal server error is not helpful. It's the generic error thrown by the server. To identify the exact issue you have to check the server error log. It could be a memory limit issue, in such case you have to increase the PHP memory limit.
On the component side, you can try to decrease the precaching limit from 5000 links (default) to lower values (1000, 500, 100 etc)
Obviously the lower the number of links processed at each step, the lower will be the amount of resources requested... this is the main purpouse of ajax precaching.
Regards