!! Unexpected error while processing request: failed to allocate memory

后端 未结 1 852
孤城傲影
孤城傲影 2021-01-29 11:19

Please help me in solving this error.

I am getting this error while loading records from text files in to database using ruby scripts.

It just works fine if I

相关标签:
1条回答
  • 2021-01-29 11:45

    Try something like this:

    File.open(fileName) do |csv|
      csv.each_line do |line|
        CSV.parse(line) do |values|
          # Here you can do your manipulation
        end
      end
    end
    

    This way is slower, but it should ensure you don't get out of memory.

    0 讨论(0)
提交回复
热议问题