Thumbnail generation eats a lot of memory

Project:ProjectPier
Version:0.8.5.0-Beta1
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed - fixed
Description

Hi All,
I am new to ProjectPier and am just in the process of testing for use within my company with a view of adding some extension for specific tasks. I am having a couple of problems at the moment, the first being the directory problem on file upload (i want to use the file system storage method because I will be dealing with large photoshop files) which i understand there is a work around for. The second is an unusual problem and may be related to my configuration but i cant find where. If i upload a file (in DB mode at the moment) to a project when i try to view the file listing it seems to fail at the image and does not process the stylesheets.
I have attached a screen shot of this.

Has anyone had this problem before and how did you rectify?

Thanks in advance,

Matthew

AttachmentSize
Page Image.png14.55 KB
#1

I'm having exactly the same issue on a jpg upload - screen appears the same as previous user's when I try to access the file. I was able to upload other filetypes (eps, doc) without any problem. I'm on PP 0.8.0.3 I'd love to see a solution for this. Thanks.

#2

1) Are you using Db mode too? If so, try it with the filesystem mode

If that doesn't work then

2) Enable Debug mode - open config/config.php and change define('DEBUG', false); to define('DEBUG', true);

And could you also paste the html source on a pastebin too please?
(Right click the page -> view source)

#3

After doing some testing, I've found I was able to succesfully upload one jpg file that had no spaces in the filename. Tried again with other files after removing spaces from the name, but got the same error results as before - not sure what the difference is, but it doesn't seem to affect 100% of jpg uploads.... Also just noticed successful upload was about 100kb, unsuccessful uploads have all been about 700k.

#4

OK - changed to filemode from db storage and tried to upload - after a few seconds, page comes back, but only has the following code in it -

<div id="fileDetails" class="block">
  <div class="header">pswebsite012.jpg</div>
  <div class="content">
    <div id="fileIcon"><img src="

and stops right there. I will turn on debug and post what I find from that. Thanks.

#5

OK - turned debug on and when I go to files, the following code is from the page that is displayed -

<div id="files">
<div class="filesOrderAndPagination">
  <div class="filesOrder">
    <span>Order by:</span>
    <a href="http://[path removed]/index.php?c=files&amp;a=index&amp;active_project=9&amp;order=name&amp;page=1">filename (a-z)</a> | <a href="http://[path removed]/index.php?c=files&amp;a=index&amp;active_project=9&amp;order=created_on&amp;page=1" class="selected">date and time</a>
  </div>
  <div class="filesPagination">
<div class="advancedPagination">

<span>Page:</span>
<span>(1)</span>
</div>
  </div>
</div>
<h2>Monday, 6 October</h2>
<div class="filesList">
  <div class="listedFile even">
    <div class="fileIcon"><img src="<br />
<b>Fatal error</b>:  Allowed memory size of 16777216 bytes exhausted (tried to allocate 2048 bytes) in <b>/[path removed]/library/simplegd/classes/SimpleGdImage.class.php</b> on line <b>123</b><br />

Looks like maybe I just need to up my php memory limit?

#6

That seemed to do the trick - I upped my php memory_limit setting and then set file storage back to db and everything appears to be working properly for files now. Thanks!

#7

Glad we could help :)

#8

I have the same problem.
It is related to thumbnail generation, as soon as you upload a picture file taller than 2400*2400.

Where do you change memory limit ?

or do you know a way to disable thumbnail generation ?

thanks

#9
Title:Jpeg as files in project» Thumbnail generation eats a lot of memory
Version:0.8.0.2» 0.8.5.0-Beta1

Thumbnail generation uses GD library which eats a lot of memory, suppose we need replaceable image-handling libs (IMagick www.php.net/imagick or ImageMagick as convert utitlity)

#10

try adding php_value memory_limit 128M in .htaccess.
worked for me.

#11
Status:new» closed - fixed

Issues is being closed, an acceptable solution has been discussed. The only reason I could see to leave this issue open is that a switch from GD to Imagemagick was discussed but there is no guarantee this would work any better.

#13
Status:closed - fixed» patch - code needs work

adding php_value memory_limit 128M in .htaccess. defintivly not solving the problem.
I am able to upload files up to 128 mb but get the thumbnail-error for large images.
i disabled Thumbnails and it worked for me, but tahts not the best way.

#14
Status:patch - code needs work» closed - fixed

A workaround is present in 0.8.6 that does not generate an error. The code will now check if the memory usage would be above some limit (configurable). If yes, a white thumbnail is displayed with the image dimensions in it. An example is attached. A real solution would need to work with the file system and not in memory (e.g. the convert utility).

AttachmentSize
pp-large-dimension-solution.png 214.81 KB