As a first step, stop running your programs as CGI programs. Run them from the console.
In reply to Re^3: failure: 400 by Corion in thread failure: 400 by bigup401