in reply to Parsing large files

What format is the file in?
if its using a different line terminator than normal (\r\n on windows) then it'll try and load the entire file into memory. (if theres a bad terminator in a line that would explain it)

try to find out what line number it dies on. (just a counter and a print, nothing fancy), then try and avoid that line.