[SOLVED] 16M not enough

Laubi

Joined: 2005-05-19
Posts: 2
Posted: Thu, 2005-05-19 12:03

I just installed the latest Gallery2 on my test machine. After I solved the problem with Step 7 it worked fine.

But now I found another problem. I tried to upload a panorama picture. First I uploaded it like a "normal picture" and then I wanted to change it to a pano pic by using "Edit Photo" - nothing happend. Then I recognised that "Edit Photo" didn't work on any picture.
The reason for that was quite simple. On the server log I saw that php tried to allocate more than 16M! On my test machine that's no problem but for production use it's a bad idea to increase the memory limit to 32MB which is my current value..

Is it possible that it happend because I have some large pictures? I saw that you stream the picture through a php script which makes sense for security reasons but not for performance..

I would really like it to have G2 on my production server but with this requirment it's simply not possible :cry:

Laubi

----

Gallery URL (optional):
Gallery version: G2B3
Webserver (with version): lighttpd 1.3.13
Datatabase (with version): MySQL 5.04beta
PHP version (eg 4.2.1): 5.04
phpinfo URL (optional):
Graphics Toolkit(s): netpbm,gd
Operating system: debian sarge
Web browser/version:
G1 version (for migration bugs):

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2005-05-19 13:41

How large was the photo you tried to upload? Most of the restrictions come directly from the server setup. For instance the server my sites are hosted on, no single file can be larger than 4MBs for an upload through PHP with a total of 8MBs max.

However, you could FTP (better yet, SFTP or SCP) your file(s) to your local server and setup G2 to grab the images from the local server. Then you're not uploading through the PHP upload. I'm not sure if G2 is then taking up that much memory when actually processing the photos through ImageMagick, NetPBM or GD though. For instance, on my server, if the process runs more than 30 seconds or it's killed and no single process can use more than 16MBs memory.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-05-19 14:29

Laubi, 16mb is the absolute minimum for G2, and if you use the GD toolkit, 16mb is not enough in most cases. move netpbm in the image toolkit up (higher priority than GD) and it should be better for all image types that your netpbm version can handle.

streaming the pics through php doesn't load the complete image / video / whatever into memory. we read a few kb at a time, not more.

 
Laubi

Joined: 2005-05-19
Posts: 2
Posted: Thu, 2005-05-19 14:48

Well that helped thanks a lot!

Anyway I don't get the point why I shouldn't be able to see something when I click "Edit Photo". Just by clicking I don't execute any picture manipulations..?