Я получаю эту ошибку при попытке создать слишком много объектов в памяти.Это приложение Rails 2.3.x с SQL Server в качестве базы данных.
>> Shop.count
=> 14111
>> Shop.all
ActiveRecord::StatementInvalid: ArgumentError: negative string size (or size too big): SELECT * FROM [shop]
from /Users/lunks/.rvm/gems/ree-1.8.7-2011.03@ums/gems/activerecord-2.3.14/ lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
from /Users/lunks/.rvm/ gems/ree-1.8.7-2011.03@ums/gems/activerecord-sqlserver-adapter-2.3.24/lib/active_record/connection_adapters/sqlserver_adapter.rb:1004:in `raw_select'
from /Users/lunks/.rvm/gems/ree-1.8.7-2011.03@ ums/gems/activerecord-sqlserver-adapter-2.3.24/lib/active_record/connection_adapters/sqlserver_adapter.rb:965:in `select'
from /Users/lunks/.rvm/gems/ree-1. 8.7-2011.03@ums/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
from /Users/lunks/.rvm /gems/ree-1.8.7-2011.03@ums/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all'
from /Users/lu nks/.rvm/gems/ree-1.8.7-2011.03@ums/gems/activerecord-2.3.14/lib/active_record/base.rb:665:in `find_by_sql'
from /Users/lunks/.rvm/gems/ree-1.8.7-2011.03@ums/gem s/activerecord-2.3.14/lib/active_record/base.rb:1582:in `find_every'
f rom /Users/lunks/.rvm/gems/ree-1.8.7-2011.03@ums/gems/activerecord-2.3.14/lib/active_record/base.rb:619:in `find'
from /Users/lunks/.rvm/gems/ree-1.8.7-2011.03@ums/ge ms/activerecord-2.3.14/lib/active_record/base.rb:639:in `all'
from (irb):3`