Jump to content

php memory_limit


thedarkwinter

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.