On Wed, Apr 16, 2008 at 5:48 AM, Dave M G <martin@xxxxxxxxxxxxx> wrote: > PHP list, > > I have a PHP script that resizes an image. It takes just about whatever > size and shrinks and crops it down to 320X240. > [snip!] > > So sometimes I've seen an error in my logs that says: > > Fatal error: Allowed memory size of 8388608 bytes > exhausted (tried to allocate 8000 bytes) in > /home/public_html/Action.php on line 153. [snip!] > > What would be a recommended size? While I want to have enough to work with > large images, I don't want to overload the server. I set the server-wide setting on most of my servers to 64MB. This includes my shared hosting servers, where resources are then monitored otherwise and then clients who may overuse or abuse resources may be bumped to a more powerful system (VPS, dedicated, or even just a higher shared plan). So I'd recommend using 64MB, but monitoring traffic as well --- because that 64MB max limit will be for each execution of each script. So if you have 100 simultaneous connections each using the maximum memory allowed by configuration, you're looking at ~6.4GB memory --- clearly into swap space, and not an optimal situation. -- </Daniel P. Brown> Ask me about: Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo., and shared hosting starting @ $2.50/mo. Unmanaged, managed, and fully-managed! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php