?
Solved

How can I solve this problem with my allocated memory?

Posted on 2014-09-25
4
Medium Priority
?
165 Views
Last Modified: 2014-09-25
I'm exporting a table from a MySQL database. The code is good, but the table is 250,000 rows and my pipes are apparently getting clogged based on this error:

Allowed memory size of 36700160 bytes exhausted (tried to allocate 24 bytes) in C:\wamp\www\json\csv_test.php on line 19

I put this at the top of my page:

ini_set("memory_limit","35M");

But to no avail. I'm missing something....

What do you think?
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 1000 total points
ID: 40344815
Do you not have more memory than that?
Why not do batches of 50,000 and see if it goes through.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40344824
What does the code say?  Please show us all of it, not just line 19.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 total points
ID: 40344828
You might also want to learn about phpinfo() so you can see what the true memory limit is before you set it to something arbitrary.  You can learn a lot from phpinfo()
http://php.net/manual/en/function.phpinfo.php
0
 

Author Comment

by:brucegust
ID: 40344830
Thank you, gentlemen! I figured it out and yes, Ray, I saw that too. Thanks!

BTW: Still not out of the woods. I'm a pig on roller skates, boys...

http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/Q_28525834.html
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question