Best solution - remove all shared variables. They are evil, and should be done away with at the earliest opportunity. There are many alternatives to their use, for example a session-level super procedure with a temp-table, get and set functions.
Rubbish solution one - increase -l to...