Singing big files

When I try to sign a binary file of 2 MB with
pkcs11-tool.exe --sign --input-file tempfile.bin -m ECDSA-SHA256--output-file signature.bin -v --ID {private_key_id}
The signature verification always fails, but the signing command itself says everything is OK.

It seems the HSM is not able to process files bigger than about 1k. That might be logical as it could also take a very long time to calculate the SHA with the HSM but why doesn’t it complain the file is too big and just aborts the signing.

Most likely the same problem occurs when we want to verify a big file