Files not uploading and Getting Errors

I am not able to upload images and I am getting this popup error everytime I try to upload an image:

Sorry, there was an error uploading that file. Please try again.

I checked the File settings and the max upload limit of an image is 3072 KB. I even changed it to 7000KB but no use. I am not able to upload an image of size 30KB? One of the problem I observed is that I am able to uplaod short width images with width < 400px but not for wider images. Don’t know what is wrong at http://ask.mybloggertricks.com

I did delete browser image cache but no use. Would really appreciate a help here

UPDATE: The problem was due to a recent version of discourse that caused some bugs due to memory leak as discussed here which thanks to @sam is all setup now!

Are there any related erros in /logs?

@zogstrip This is what see in errro log

Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
16 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
16 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
9 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
9 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
8 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
8 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
7 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
7 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
6 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
6 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
5 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
5 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
5 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
5 mins ago
!!	
Errno::ENOMEM (Cannot allocate memory - convert public/uploads/letter_avatars/2/T/115_171_32/240.png[0] -background transparent -gravity center -thumbnail 20x20^ -extent 20x20 -interpolate bicubic -un
5 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
4 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
4 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
4 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
4 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!!	
Errno::ENOMEM (Cannot allocate memory - convert /var/www/discourse/public/uploads/default/39/85758821f49d44cb.png[0] -background transparent -gravity center -thumbnail 25x25^ -extent 25x25 -interpolat
3 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
3 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
2 mins ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
2 mins ago
!!	
Errno::ENOMEM (Cannot allocate memory - convert /var/www/discourse/public/uploads/default/39/85758821f49d44cb.png[0] -background transparent -gravity center -thumbnail 25x25^ -extent 25x25 -interpolat
2 mins ago
!!	
Errno::ENOMEM (Cannot allocate memory - convert public/uploads/letter_avatars/2/T/115_171_32/240.png[0] -background transparent -gravity center -thumbnail 32x32^ -extent 32x32 -interpolate bicubic -un
2 mins ago
!!	
Errno::ENOMEM (Cannot allocate memory - convert public/uploads/letter_avatars/2/T/115_171_32/240.png[0] -background transparent -gravity center -thumbnail 20x20^ -extent 20x20 -interpolate bicubic -un
2 mins ago
!!	
Errno::ENOMEM (Cannot allocate memory - convert /var/www/discourse/public/uploads/default/39/85758821f49d44cb.png[0] -background transparent -gravity center -thumbnail 32x32^ -extent 32x32 -interpolat
2 mins ago
!!	
Errno::ENOMEM (Cannot allocate memory - convert /var/www/discourse/public/uploads/default/39/85758821f49d44cb.png[0] -background transparent -gravity center -thumbnail 45x45^ -extent 45x45 -interpolat
2 mins ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
a min ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
a min ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
a min ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
a min ago
!	
Job exception: Cannot allocate memory - df -Pk /var/www/discourse/public/uploads/default | awk 'NR==2 {print $4 * 1024;}'
a min ago
!	
Job exception: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
secs ago
!	
Job exception: Wrapped Errno::ENOMEM: Cannot allocate memory - df -P /var/www/discourse/public/uploads | tail -1 | tr -s ' ' | cut -d ' ' -f 5
secs ago

Dashboards shows the following upload stats:
uploads 1000 KB (21 GB free)

Disk space isn’t the issue, your server has run out of RAM. Discourse has (had?) a bit of a memory leak; update and restart Discourse and this error should go away – unless something else running on your server is hogging all your RAM. :wink:

2 Likes