title: Cloud Functions for Firebase killed due to memory limit exceeded
body: <p>I keep getting a sporadic error from Cloud Functions for Firebase when converting a relatively small image (2mb). When successful, the function only takes about 2000ms or less to finish, and according to Image Magick documentation should I should not see any problems.</p>
  
  <p>I tried increasing the buffer size for the command, which isn't allows from within Firebase, and I tried to find alternatives to <code>.spawn()</code> as that could be overloaded with garbage and slow things down. Nothing works.</p>