I used QGIS to put together an OSM XYZ Tile-layer and some WMS-layers. Now I want to make a print map out of it. When I try to export it from the print layout editor to PNG or PDF in the desired resolution and size, QGIS quickly eats up all memory of the system and then gets killed or crashes due to out of memory.
Before exporting, it warns me with a message that it will take something like 500 MB of memory. But when running it will very quickly eat up the 6 GB of (remaining) system memory, then the 8 GB of swap, and then gets terminated.
Is there an option to make QGIS work in pieces and stitch them together afterwards (probably with some other tool), or any other way to export a big raster image from the print composer?
It is currently QGIS 3.6.1 on Arch Linux.