PHP - Moved: Display.php Out Of Memory
This topic has been moved to Third Party PHP Scripts.
http://www.phpfreaks.com/forums/index.php?topic=332709.0 Similar TutorialsThis topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=327462.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=342944.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=332434.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=342917.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=308032.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=321890.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=314226.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=350021.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309973.0 Amazingly, PHP Coding Help != JavaScript Help. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=333336.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=309827.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=348417.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=359077.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=321950.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=321339.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347166.0 Just how big can i make this ? Im sure it depends on the server hardware and if thats the case then how does one fidn out how big I can make this. I want to max it out. -SB I am in the midst of developing a web application and despite having a decent amount of experience in web development, I never really stopped and gave a ton of thought to memory when it comes to my php scripts. However, with this project I am using zend framework and it is a decent memory hog. So I have some questions... I am monitoring my memory use for a typical call to my site and it appears as though its somewhere around 20MB. This seems like a ton and I am actively looking for ways to decrease it. One thing I noticed is that when I call zend's date class for the first time, my memory usage shoots up 3MB. However it is pretty much untouched for other instances of this class. So if I do Code: [Select] echo(memory_get_usage()); echo('<br />'); $this->last_login=Zend_Date::now(); echo(memory_get_usage()); echo('<br />'); $this->last_active=Zend_Date::now(); echo(memory_get_usage()); echo('<br />'); The result is Quote 9136448 12812408 12814496 So the jump is with that first call. My question is, if two users are accessing the site at the same time, will they both experience that 3MB memory use? Or will the server have that class in memory so it only uses 3MB once? Basically, if a call to the site uses 20MB of memory, will it be 20MB * the number of users. Or will the server have a lot of the information loaded into memory to subsequent calls so multiple users would use up far less memory then the initial? I would assume the latter is the case based on the fact that reusing zend_date doesn't incur a 3MB hit every time. But without being admin of my server and hvaing tons of folks to test at once, its hard to tell. What happens if you do not unset an array before the script is done executing? I am running through thousands of CSV files, parsing data for hundreds of thousands of customers. It works fine for the first 5/6 hours then starts bogging down bad. I run about 5-10 CSVs per execution...I'm wondering if unsetting the arrays in the script would help this or not...I thought they would be unallocated after the script ends. Am I wrong? Hey guys i have been making a website where friends can post on each others profiles like facebookish anyways im not sure if this is th ebest way to do it but i have this below its part of the code that pulls all the friends of the member from the database:: $query_friend = mysql_query("SELECT my_id,friend_id FROM site_friends WHERE my_id='$my_id'"); while($row = mysql_fetch_assoc($query_friend)){ $friend_id = $row['friend_id']; } then i pass it into a function blah blah not got that for yet anyway what happens if this person ends up having 100s of friends will this be harsh on the servers memory? or should i not worry to much ? hope someone can help thanks!! |