Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I solve this problem with my allocated memory?

Posted on 2014-09-25
4
Medium Priority
?
172 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

877 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