Mongo error when using aggregation: sort exceeded memory limit

By default aggregation in MongoDB occurs in memory and pipeline stages have limit of 100 Mb RAM. Looks like you have exceeded this threshold. To handle large dataset you should enable aggregation pipeline stages to write data to temporary files. Use allowDiskUse option for that: db.BASE_TABLE_CREATION_ExecuteHiveScript_26_V0.aggregate([ { “$project” : { “visitor_localdate” : 1 , “_id” … Read more

Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php [duplicate]

If your script is expected to allocate that big amount of memory, then you can increase the memory limit by adding this line to your php file ini_set(‘memory_limit’, ’44M’); where 44M is the amount you expect to be consumed. However, most of time this error message means that the script is doing something wrong and … Read more

Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)

Changing the memory_limit by ini_set(‘memory_limit’, ‘-1′); is not a proper solution. Please don’t do that. Your PHP code may have a memory leak somewhere and you are telling the server to just use all the memory that it wants. You wouldn’t have fixed the problem at all. If you monitor your server, you will see … Read more