Jump to content

Out Of Memory (needed 8164 Bytes)


tal

Recommended Posts

hello alli have a problem like so i have a script writen in c++ that does MANY select queries 82,301,184 is the number of SELECT queries it needs to make and a much smaller number of INSERT queries about 9,000at about 100,000 SELECT queries (and 10 INSERT) i get the next error massage - "Out of memory (needed 8164 bytes)"can any one shed some light on this memory issue ?what should i check for ?thank youTal

Link to comment
Share on other sites

Are you storing the results of all 82 million select statements, or do you get of rid of each result before getting the next one? Because if you're storing 82 million result sets, assuming that each result set is pretty small and only takes up 512b of memory, you're asking for 41GB of RAM. So your program would only run on a machine with at least 41GB of memory free (and that's assuming there isn't a lot of data in the results).If each result set needs 8164 bytes then you're asking for at least 672GB of RAM. 100k records would take up a little over 800MB.

Link to comment
Share on other sites

hy great help justsomeguyit was a logic problem i was using mysql_free_result but not in the right placesnot after every iteration (when ever i can)but all at once after a big iteration so i was probebly storing more then i have toi will now let it run throw the nighthopfully see tommorow if it is done and had enouth memorythanks again justsomeguyTal

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...