Is there a limit on the size of an array in ruby?

There is not a software limit imposed by Ruby, but there is a limit as to how much the process can support. If you have a regular home server running the Ruby server, it would be able to handle an array until the array became too large, at which point it would begin to 'bog down', lag, crash, etc. On the other hand, if you had an extremely powerful corporate server, it could handle a much larger array, but would still eventually crash/lag if the array became too large for the process and the hardware (memory) to handle.

I don't have any concrete numbers for you, because it all depends on the hardware and software on the server.


Take a look at this other post: Array size too big - ruby. The size of 600 million was too big, but 500 million worked.

How big of an array are you working with? The problem may be that you're running out of memory!

Tags:

Arrays

Ruby