This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.1 » Server memory problems
Server memory problems [message #97317] Wed, 14 April 2010 10:13 Go to next message
kurosaki  is currently offline kurosaki
Messages: 67
Registered: August 2008
Member
Hello,

Has anyone done some tweaks to symfony 1.1 to handle the server's memory more efficiently?

Now I have problem with some parts of my application in this specific part of the year. A lot of peers connect to the application and then the server runs out of memory (and swap also).

So I always keep watching the logical to optimize code but is there any optimization to destroy objetcs or connections created by the framework?

Thanks in advance.
Re: Server memory problems [message #97325 is a reply to message #97317 ] Wed, 14 April 2010 11:01 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Not sure about that. However if you have a lot of AJAX - an area where many connections can swamp a server - you can always handle this in ordinary PHP. I think there is also a 'cut down mode' that doesn't do cacheing or templating - it was on Francois Zaninotto's blog, I think - let me know if you can't find it.

[Updated on: Wed, 14 April 2010 11:02]


Remember Palestine
Re: Server memory problems [message #97326 is a reply to message #97317 ] Wed, 14 April 2010 11:02 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
What are the specs of your server btw, what rate of users are you handling, and what memory usage measurements have you got so far?


Remember Palestine
Re: Server memory problems [message #97357 is a reply to message #97317 ] Wed, 14 April 2010 15:56 Go to previous messageGo to next message
kurosaki  is currently offline kurosaki
Messages: 67
Registered: August 2008
Member
memory: 10GB ram
2 processors
average of 100 connections (httpd threads at the same time)
php memory limit 512MB
200 limit conections apache
database server is another machine.
Re: Server memory problems [message #97378 is a reply to message #97317 ] Wed, 14 April 2010 18:58 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Does your PHP instance really require that much memory? Many applications get by quite nicely with 32Mb to 128Mb per user instance. If you can do this you'll be able to increase the minimum server count, which in turn will mean your users will be served faster, and thus each user should occupy a server slot for less time.


Remember Palestine
Re: Server memory problems [message #97381 is a reply to message #97378 ] Wed, 14 April 2010 19:02 Go to previous messageGo to next message
kurosaki  is currently offline kurosaki
Messages: 67
Registered: August 2008
Member
I dont require that BIG memory, I had to increment it but still get the problem.

Where I can increase the minimum server count? Is that a parameter? sorry by my ignorance...
Re: Server memory problems [message #97749 is a reply to message #97317 ] Wed, 21 April 2010 12:12 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
OK reset your memory limit back down to 64Mb or so. You can find out your peak memory usage by echoing the following in a template, maybe just in dev mode, or perhaps in HTML comments:

http://uk.php.net/manual/en/function.memory-get-peak-usage.p hp


Remember Palestine
Re: Server memory problems [message #97751 is a reply to message #97317 ] Wed, 21 April 2010 12:13 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I am presuming you are running *nix, can you confirm you are running Apache Handler to connect to PHP?

Then have a look at this doc, which shows you how to set up a minimum number of spare servers:

http://httpd.apache.org/docs/2.2/misc/perf-tuning.html


Remember Palestine
Re: Server memory problems [message #97785 is a reply to message #97751 ] Wed, 21 April 2010 16:42 Go to previous message
kurosaki  is currently offline kurosaki
Messages: 67
Registered: August 2008
Member
Maybe I have a clue. The swap memory is lesser than the half of the physical memory. I think that could be affecting the system performance.
Previous Topic:propel-generate-crud - The "default" context does not exist.
Next Topic:[Solved] Problem with Form Generator
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software