Current time: 05-05-2024, 01:21 AM Hello There, Guest! (LoginRegister)


Post Reply 
limiting memory per user / php-cgi process
Author Message
davidcafe Offline


Posts: 1
Joined: Oct 2011
Reputation: 0
Post: #5
RE: limiting memory per user / php-cgi process
(10-14-2011 09:33 PM)Catscrash Wrote:  I seem to have a problem in one of my clients php-scripts. every now and then it starts eating up all 8G of memory and the 2g of swap as well. It's always the same user and only one php-cgi process.

Until the user fixes that script, what can i do to prevent one process from eating up all the system's memory?

And why doesn't the "memory_limit = 512M" setting in /var/www/fcgi/user/php5/php.ini work? A phpinfo.php in the users page shows

memory_limit 512M 512M

thanks for any help
For solving your problem you can do some steps may be it will help you.

1. Changing memory_limit globally from php.ini
This is the simplest and most obvious method. You just edit your php.ini and change the memory_limit to whatever you need. For ex:
memory_limit = 32M
2. Changing memory_limit using .htaccess for a single folder/vhost
php_value memory_limit 64M
3. Changing memory_limit inside a single php script.
ini_set('memory_limit', '64M');
10-21-2011 09:17 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: limiting memory per user / php-cgi process - davidcafe - 10-21-2011 09:17 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)