I once had a similar problem with the ActiveState port of Perl on Windows 2000. It would just hang with no errors at seemingly random times while the same code on Linux was just fine (no unportable code mind you). My solution was to switch the server to Linux, and I haven't looked back yet. ;-)