Basic error with Snappy (Python beginner)

Still the same error… “No memory left for cache!”
When I change the output format to ‘Geotiif’, the error is: “Cannot construct DataBuffer”

Configuration:
snap.properties

  • snap.jai.tileCacheSize = 1024
  • snap.jai.defaultTileSize = 256 (tried from 64 to 1024)
  • snap.parallelism = 8

snappy.ini

  • java_max_mem: 21504M

jpyutil
jvm_maxmem=‘21504M’

All the functions from GPF run OK, apparently. The problem occurs with ProductIO.writeProduct.