thedarkwinter Posted August 16, 2007 Share Posted August 16, 2007 Hi guys Just getting your opinions on changing the memory_limit in php.ini I have a site that normally has about 10 concurrent users at any time, doing minimal hardware-stress work. I need to add one script thats a major database export to csv, it only takes a few seconds to run but it crashes out at about 150MB of memory. Is it a bad idea to set the limit to 256MB ?? Are there any major drawbacks. Seems fine on my test server. Cheers, tdw Quote Link to comment https://forums.phpfreaks.com/topic/65205-php-memory_limit/ Share on other sites More sharing options...
tibberous Posted August 16, 2007 Share Posted August 16, 2007 I'd do it. Quote Link to comment https://forums.phpfreaks.com/topic/65205-php-memory_limit/#findComment-325584 Share on other sites More sharing options...
NArc0t1c Posted August 16, 2007 Share Posted August 16, 2007 The most i've seem sovar on a php/mysql server with apache is 32MB(that server has about 4GB MEM). Remember the server still has to have resources to do the other processes. On you're testing server 256MB might not do anything. but try it with about two thousand connections. Quote Link to comment https://forums.phpfreaks.com/topic/65205-php-memory_limit/#findComment-325587 Share on other sites More sharing options...
thedarkwinter Posted August 16, 2007 Author Share Posted August 16, 2007 hehe, tibberous, that sounds like a dare NArc0t1c, thats my concern... but will it just slow down everyone else, or could it actually crash apache or something? Bearing in mind that its been running on 8MB, none of the other scripts are intensive. Quote Link to comment https://forums.phpfreaks.com/topic/65205-php-memory_limit/#findComment-325590 Share on other sites More sharing options...
NArc0t1c Posted August 16, 2007 Share Posted August 16, 2007 Well, If the memory limit is as high as 256MB, then php won't do anything, so apache will crash and you're server may do that as well. I have set my limit up to 32MB once, to run a simple curl script that would post data to a page, then suddenly my apache crashed. So if my memory limit there was 256MB, because I have a powerful processor it probably would not have crashed but would have lagged like hell. Quote Link to comment https://forums.phpfreaks.com/topic/65205-php-memory_limit/#findComment-325680 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.