5

Since I updated my production setup to Wagtail 1.11 I cannot load the admin page for images. Visiting /admin/images/ results in a 502 error. In my development setup I don't have the same problem

This is the result of a crash of the runner. The memory and CPU usage of the runners gets too high for the server to handle at which point they are killed. (Seen in top and restarts are shown in the logs)

This seems to be the same as https://github.com/wagtail/wagtail/issues/3575, but Wand is not used and no GIF images are uploaded to the system so this is not the cause. The following seemingly relevant python packages are used:

Django==1.11.3
gunicorn==19.7.1
Pillow==4.2.1
wagtail==1.11.1
Willow==0.4

The project is running on a fully updated Ubuntu 16.04 machine.

Does anyone have a suggestion of what can fix this bug?

Dekker1
  • 5,565
  • 25
  • 33
  • What version of Wagtail were you on before? – gasman Jul 11 '17 at 08:54
  • @gasman I was on version `1.10.1`. I followed all updates since the start of my project in March – Dekker1 Jul 11 '17 at 09:16
  • 1
    I can't immediately see any changes in 1.11 which would affect the /admin/images page. Is it possible that you upgraded some other package at the same time? My main suspect is Imagemagick / Wand (are you using that...?) - /admin/images potentially has to render a large number of thumbnails, and we've had some reports of high memory usage https://github.com/wagtail/wagtail/issues/3575 which might be causing the server process to be killed here. – gasman Jul 11 '17 at 09:45
  • Your diagnosis seems accurate since the process is killed in the way you describe. I'm however not aware that I'm using these packages. Any tip on which package I should look for on a ubuntu machine? – Dekker1 Jul 11 '17 at 10:08
  • `pip freeze | grep Wand` will tell you what version of Wand (if any) you're using. – gasman Jul 11 '17 at 10:15
  • I'm not using Wand. The command doesn't output anything – Dekker1 Jul 11 '17 at 10:47

1 Answers1

4

Try removing some of the more recent or larger images and reloading the page. The problem could be the result of a corrupt or malicious image.

The easiest way to diagnose if this is the problem is to:

  1. Move all images from the media/original_images folder to a backup folder.
  2. Access the /admin/images page. If this was the problem the page should now load again.
  3. Note all images that now do not have a thumbnail; these are the pictures crashing the application.
  4. Move all picture except for the ones noted back into the media/original_images folder.

Except for the picture crashing your system, everything should now work similar to what it did before.

Dekker1
  • 5,565
  • 25
  • 33
jsnid00
  • 528
  • 1
  • 4
  • 8