Questions tagged [memory-limit]

In electronic digital computers, there are different limitations on the usable memory address space. You can reach the limit of memory in different programming languages in different ways.

To hit the memory limit can have several different reasons and so are there different ways to solve the problem.

234 questions
703
votes
38 answers

Generate an integer that is not among four billion given ones

I have been given this interview question: Given an input file with four billion integers, provide an algorithm to generate an integer which is not contained in the file. Assume you have 1 GB memory. Follow up with what you would do if you have…
SecureFish
  • 2,241
  • 7
  • 32
  • 42
663
votes
31 answers

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

I have a bunch of client point of sale (POS) systems that periodically send new sales data to one centralized database, which stores the data into one big database for report generation. The client POS is based on PHPPOS, and I have implemented a…
ArcticZero
  • 6,671
  • 3
  • 17
  • 8
309
votes
22 answers

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

This error message is being presented, any suggestions? Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php
panidarapu
  • 8,031
  • 6
  • 24
  • 24
68
votes
5 answers

PHP : settings memory_limits > 1024M does not work

For bads reasons I need to set memory_limits higher than 1G for a directory, but on my PHP 5.2.17 on Lenny server when I put for example 2048M I get only the php.ini default value (256M). PHP run as an apache module, phpinfo give us (for the…
Cédric Girard
  • 3,228
  • 7
  • 34
  • 50
56
votes
8 answers

How to increase memory limit for PHP over 2GB?

I have an problem increasing memory limit for PHP as Apache module. If I put following directive in Apache configuration, that work OK: php_value memory_limit 1.99G But over 2GB do not work, it's restore this value back to 128MB. What is the…
mikikg
  • 1,420
  • 1
  • 11
  • 21
45
votes
9 answers

checking memory_limit in PHP

I'm need to check if memory_limit is at least 64M in my script installer. This is just part of PHP code that should work, but probably due to this "M" it's not reading properly the value. How to fix this ? //memory_limit echo ""; …
Spacedust
  • 811
  • 1
  • 11
  • 22
41
votes
8 answers

Allowed memory size of X bytes exhausted

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13965430 bytes) PHPInfo shows that I have a memory_limit of 128M, so I'm confused as to why the error says I only have 64M. Is it possible for phpinfo to report…
Nathan
  • 2,495
  • 4
  • 24
  • 43
41
votes
3 answers

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes)

I'm getting an error when I try to open one of my dashboard pages in my wordpress script The error message is as follows: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in …
Tarek Ezzat
  • 425
  • 1
  • 5
  • 8
25
votes
3 answers

Is the more the better for PHP memory_limit?

In PHP, i am oftenly facing memory limit problem. Especially with highly resource integrated systems like Drupal, etc. What i want to know here is: Is it good to have very high php memory limit like 2GB? Is there any major drawback? Edited: As a…
夏期劇場
  • 15,969
  • 40
  • 121
  • 208
22
votes
9 answers

Upper memory limit for PHP/Apache

I'm getting the error when I run my PHP script.... Fatal error: Out of memory (allocated 1827405824) (tried to allocate 88800 bytes) I've added this line to my PHP script.. ini_set("memory_limit","3000M"); This statement does seem to correctly…
spiderplant0
  • 231
  • 1
  • 2
  • 5
22
votes
7 answers

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes)

I have two domains, webhosted on 000webhost. I installed wordpress on them and for some days it functioned well, but now it shows me the following error on both of them: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to…
tudorvisanmiu
  • 241
  • 1
  • 2
  • 5
21
votes
3 answers

phpunit memory_limit parameter does not apply

I've just installed phpunit via pear in a mac osx 10.7 and everything works fine except I got memory limit errors (xdebug enabled for reports). I tried to add the -d memory_limit=512M parameter to phpunit but it is not applying because, on the very…
jerkan
  • 560
  • 2
  • 10
  • 25
19
votes
2 answers

Undefined index error upon $em->clear() in Symfony2

I have written a Symfony command to import some data from an API. It works but the problem is my PHP memory usage increases when I insert a big JSON in my database. And my unitOfWork increases by '2' to after each activty import. I have already…
psylo66
  • 558
  • 9
  • 24
16
votes
5 answers

Mongo error when using aggregation: sort exceeded memory limit

I get the mongo error exceeded memory limit with error code 16819 when I use aggregation sort. Im using mongo 2.6. The query is as follows: db.BASE_TABLE_CREATION_ExecuteHiveScript_26_V0.aggregate([ { "$project" : { "visitor_localdate" : 1 ,…
acube
  • 161
  • 1
  • 1
  • 3
13
votes
5 answers

What is the maximum memory available to a C++ application on 32-bit Windows?

Just wondering if there is a restriction on the max memory that a C++ application uses I understand that this is 2GB - Is that correct? If a C++ app tries to request more then 2GB memory does this cause a memory crash? Final question - If the…
Jack Kada
  • 22,354
  • 29
  • 75
  • 103
1
2 3
15 16