If it happens every "N number of times", that means one of the proceses has some stale data (something wasn't cleaned out completely on a previous invocation). Make sure you're not falling into any of the traps of Apache::Registry by reading the excellent mod_perl handbook at the site.