473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

PHP Fatal error: Out of memory

3
I am on a web server: IIS 6, PHP 5.3 and MySQL.
I received this fastcgi error:

FastCGI Error
The FastCGI Handler was unable to process the request.
________________________________________
Error Details:
• The FastCGI process exceeded configured activity timeout
• Error Number: 258 (0x80070102).
• Error Description: The wait operation timed out.
HTTP Error 500 - Server Error.
Internet Information Services (IIS)

So I have my admin set the following:

php.ini:
Max_execution_time = 1800

Fcgiext.ini:
RequestTimeout=1800
ActivityTimeout=1200
InstanceMaxRequests=10000
EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000

Then, I got this error:

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 469342568 bytes)

So, then I have him increase the memory_limit for php.ini to 1G.
But I am still running an out of memory problem. I am retrieving data from a table that have over 600K records.

My php page:

Expand|Select|Wrap|Line Numbers
  1. $mysqli = @new mysqli('localhost', 'user', 'pass!', 'database');
  2.  
  3. $sql = "select * from table";
  4. if($result = $mysqli->query($sql))
  5. {
  6.     echo '<pre>';
  7.     var_dump($result );
  8.     echo '</pre>';
  9.  
  10. }
  11. else
  12. {
  13.       die("Error in adding investor address: ".$sql." ==> ".$mysqli->error);
  14. }
  15.  
  16. die("help!");
Sep 16 '10 #1
1 3213
Markus
6,050 Expert 4TB
600k records is a lot of data.

The quick fix is to allow PHP to use more memory, but I wouldn't recommend it. Instead, only pull a certain amount of records at once, à la Pagination.

Mark.
Sep 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Phil Powell | last post by:
Actually the client is saying it sometimes happens and sometimes doesn't happen, and when they refresh their screen it clears itself (I assume the memory clears). Here is line 1135: $result =...
8
by: Tim Tyler | last post by:
I'm getting fatal errors when executing code - and my error handler is failing to trap them - so I get no stack backtrace :-( The error I am getting is: "Fatal error: Call to a member function...
2
by: Gonzalo | last post by:
Just upgraded php (5.0.3) - compiled from source. I'm trying to upgrade & install some Pear packages but get the following error: $ pear upgrade pear downloading PEAR-1.3.5.tgz ... Starting...
3
by: chris.mcinnes | last post by:
G'day, Got a bizzare issue with PHP 5.0.2/Apache constantly generating variations of the following error: "Fatal error: Possible integer overflow in memory allocation" At first I traced it...
1
by: kvarada | last post by:
Hello Experts, I am building my application on WinNT.4.0_i386_MSVC.7.1 platform. When I build the application on a stand alone machine, it builds fine. But when I build the same application from a...
3
by: spereira | last post by:
I am running XAMPP for Mac OS X 0.6.1 ! And since it did not have PDF libarires I downloaded ezpdf from the...
1
by: santrooper | last post by:
Hello all, I am trying to unpack big wav file (more than 10 mb), because i want to generate Visualization of an wav file, for smaller files (less than 2 mb) it works fine, but for bigger files it...
1
by: RYKLOU | last post by:
I am kinda new to php, but i do know what i am doing kinda, but i came across this error when i am trying to upload a file to my website. Fatal error: Allowed memory size of 8388608 bytes...
3
by: solinem | last post by:
Hi: I am trying to find a solution for an error that consequentially leads to Apache Server crash. Following is the message, as seen in the error.log file: PHP Fatal error: Out of memory...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.