Image load error, HTTP 500 response

upload

(Andrew Stroup) #1

I’m receiving the following error regarding SOME images that are either being auto-populated (on new user creation) or image upload. Any ideas on the root cause? Perhaps the server is too small?

Errno::ENOMEM (Cannot allocate memory - convert public/uploads/letter_avatars/2/A/241_157_191/240.png[0] -gravity center -background transparent -thumbnail 25x25^ -extent 25x25 -interpolate bicubic -unsharp 2x0.5+0.7+0 -quality 98 public/uploads/letter_avatars/2/A/241_157_191/25.png)

Some images show up (specifically added by the admin account), but for others (which have been promoted to admin recently) do not. Any help would be awesome!

p.s. I’m running on AWS EC2 (t2.micro), using a RDS postgreSQL database (db2.micro / 20GB). Pulling from the AWS monitoring here are some charts on recent activity while I was using it and came across this error. The stats would indicate this isn’t an issue with the EC2 or the RDS.

EC2

RDS


(Sam Saffron) #2

EC2 micro is on the low end of the spectrum … since we fixed a bunch of memory consumption issues recently I would recommend

cd /var/discourse
git pull
./launcher rebuild app

additionally

  1. ensure you have swap set up.
  2. Consider cutting down unicorns from 3 to 2
  3. Consider upgrading to a 2GB instance if you are running too tight on resources

(Andrew Stroup) #3

Thanks @sam!!! Just as an FYI this server deployment was done yesterday so I think I have the most recent version, but I’ll do a pull and rebuild anyways.

Can you point me in the right direction on how to ensure I have swap set up AND info on the use of unicorns as it relates the Discourse? Thanks so much!


(Sam Saffron) #4

should be at the bottom of our official guide.


(Andrew Stroup) #5

Thanks @sam, appreciate the help!